I'm migrating a solution from MOSS2007 to SharePoint 2010.
I have, among others, custom workflow actions in a DLL deployed to the GAC (e.g. MyWorkflows.dll version 126.96.36.199).
My new solution contains new workflow actions that target the SharePoint 2010 API (e.g. MyWorkflows.dll version 188.8.131.52).
So what I'm doing is:
Creating a workflow in SPD in a MOSS2007 environment. Such workflow contains one of my custom actions.
Upgrading the environment to SharePoint 2010.
Removing the WSP package containing my files/DLLs that targeted MOSS2007 and deploying a new WSP containing the solution files that target SharePoint 2010.
Add assembly redirection entries in the web.config file of my web application, so that calls to MyWorkflows.dll 184.108.40.206 get redirected to MyWorkflows.dll version 220.127.116.11 (I also add other redirection entries regarding other stuff - for example, webparts).
Reset IIS and OWSTIMER.
After that I can see that the old webparts work fine (the assembly redirection seems to work for them). However, when I try to run a workflow (manually, from the browser) it doesn't work. I get the following error in the ULS log:
Microsoft.SharePoint.SPException: at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web) at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association) 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 workflow, Collection1 events, S...
After much digging I found a workaround (which is suboptimal for me, btw):
Open the site in SPD 2010.
Navigate to "All files". Find the corresponding workflow XOML file, right-click on it and choose open as text.
On the top of the file there's a reference to the MyWorkflows.dll assembly version 18.104.22.168. Change it to 22.214.171.124. Save the file.
Open the workflow in the Workflow Editor. Save it and publish it.
After that the workflow works fine. However It would be hard to ask our clients to do that procedure for every single workflow they have.
I hope anybody out there can help me figure out how to make the assembly redirection work correctly in this case.