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 namespace of my project, its throwing an error "Error registering plugins and/or workflows. Plug-in assembly does not contain the required types or assembly content cannot be updated." while deploying it. And I have changed the namespace in .crmregister file, project properties and in source code. Then whats the problem here.?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You may need to check if the plugin with the same name exists as a registered plugin on the organization. Unregister the plugin and register the assembly and steps again.
Try to change assembly version.
In our case we used ILMerge and accidentally we merged Microsoft.Xrm.Sdk.dll into our plugin, removing this dll (copy local = false) fixed the issue.
This merged dll was not working anyway as it throw security exception Inheritance security rules violated while overriding member: 'Microsoft.IdentityModel.Claims.ClaimsIdentity.System.Runtime.Serialization.ISerializeable.GetObjectData this GetObjectData was present in Microsoft.Xrm.Sdk.dll hence security exception from SandBox deployment.
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:
apart of above cases, check .snk file or .pfx file. Does it change in your second deployment.
in this case try to use old source code or else you need to re register the plug/workflow.
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.