SharePoint 2013: Could not deserialize object. The type could not be resolved

I migrated a SharePoint 2010 application to SharePoint 2013 as described in one of my previous posts Upgrade SharePoint 2010 to SharePoint 2013. The application had several custom solutions which included components like content types, web parts, event receivers, timer jobs, workflows etc. 
I upgraded and deployed these components so that they were compatible with SharePoint 2013. So, all was set. However, when I tried to open the workflows associated with the lists in SharePoint designer, I encountered the following error:
Could not deserialize object. The type could not be resolved.

I checked the ULS logs and found the following entry:

The type or namespace name 'AssemblyName' could not be found (are you missing a using directive or an assembly reference?)". 
at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web)     
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback)    
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)     
at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)    
at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflo...

It turned out that there were some custom workflow activities in the projects. The entries needed to be added in the web.config file. For SharePoint 2010 custom activities to work in SharePoint 2013, the “authorizedType” node needs to be defined in a new sub-section “targetFx” under the “authorizedTypes” section.
profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts