Friday, April 29, 2011

Migration to CRM 2011 - The custom activity does not contain a valid CrmWorkflowActivity attribute.

We've started our migration from Microsoft Dynamics CRM 4 to CRM 2011. We've developed the full suite of customizations, Custom Workflow Activities, Plugins, ISV folder code, lots and lots of JavaScript, custom entities, etc.

So far the upgrade has been going very well. I'm very impressed by solutions in CRM 2011 compared to the quirky things I had to do to get my entities moved across organizations in CRM 4 (We have about 250 custom entities - with many relationships between many of these entities).

While migrating our development instance recently we were hitting the error
"The custom activity does not contain a valid CrmWorkflowActivity attribute."
during the UpgadeWorklowActivity step (near the end of the upgrade). Using Process Monitor from System Internals I was able to track it down to a failure just after trying to load the Microsoft.Crm.Sdk.dll (version 4.0). I had deployed the aseembly to the Server\bin\assembly folder with my CustomWorkflow library assembly.

Seeing this, I tried several things (removing the DLL, gacutil, etc). Each time waiting 1 1/2-2 hours for the migration to fail.

Frustration was kicking in and I finally decided to remove the 4.0 DLL (from everywhere) and restart the machine and try again. Success! I hope this helps someone else, remove the 4.0 assembly, reboot your server, try again.

3 comments:

Steve said...

Thank you!!! This post saved my bacon on an import!!!

pete said...

Thanks for this! Saved our day!

Varun said...

Hi we have a similar problem can you please point me on which DLL's should be removed and from where

Thanks in advance