I implemented one custom workflow in in Visual Studio 2010 using CRM 2011 Developer Toolkit. It was working fine with system generated namespace. But, when I changed the nam
I've gotten this when the preImage element was placed after the postImage element in the register. Swapping their places fixed it.
Make sure that your plugin/workflow class is a public class.
I got the same error because my plugin class was private.
I just encountered the exact same issue while toying with the CRM Toolkit.
This is how I solved the issue:
I didn't have to manually edit anything.
I changed the signing key file and got the error, changing it back to the previous key file solved the issue for me.
Your version needs to be the same one as the one that has been published already for an Upgrade. We had an Assembly version of 1 major, 0 minor - and the one we tried to publish was 12 major, 0 minor.
We changed the Visual Studio solution number back to version 1.0.0.0, Build, Load Assembly, Update - and it worked!
Deleting it would NOT solve the issue due to the dependencies from Workflows if they were used.
We switched Tracing On and found the SQL script to find the culprit.
If you are deployong your custome workflows via CRM development toolkint and package and then after that if you have changed any class name or namespace, you must change RegisterFile.crmregister file manually as Visual Studio does not do it for you. So if you change your class name from A to B and your namespace from N to M then 'TypeName' from the below xml in RegisterFile.crmregister file must be as following:
<?xml version="1.0" encoding="utf-8"?>
<Register xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/crm/2011/tools/pluginregistration">
<Solutions>
<Solution Assembly="PackageECRProcesses.CleanRegistration.dll" Id="ab72673b-c0a8-e111-af82-080027dd322f" IsolationMode="None" SourceType="Database">
<WorkflowTypes>
<WorkflowType FriendlyName="any" Name="any" Description="any." WorkflowActivityGroupName="account" Id="f0e3f436-c1a8-e111-af82-080027dd322f" TypeName="M.B" />
</WorkflowTypes>
</Solution>
</Solutions>
<XamlWorkflows />
</Register>