I'm trying to update a custom workflow activity. I made some updates to the code, and when updating it with the plugin registration tool, I got the following error:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly does not contain the required types or assembly content cannot be updated.
Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2017-03-07T16:39:14.2972227Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2017-03-07T16:39:14.2972227Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<TraceText i:nil="true" />
</OrganizationServiceFault>
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
at Microsoft.Crm.Tools.PluginRegistration.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
at Microsoft.Crm.Tools.PluginRegistration.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)
I undid ALL my changes, re-built the project, and tried to update it again, but I got the exact same error.
I then went into the project properties and incremented the build and file version by 1 (the last 2 text boxes for 'Assembly Version'). I left the first two boxes as they were, ie. the major and minor version details, as per instructions I got online for resolving this error. I then tried to update the custom workflow again, but no luck.
If it would not even update when using the original, unchanged code, what could be the issue? I've never registered a custom workflow activity before, I've done it with lots of plugins, and I've never had to change the assembly details for a plugin.
The workflow project has a batch file that runs on the post-build event. This merges 2 other dlls, could that have anything to do with it? It merges a dll with the CRM proxy file, and another helper project.
Any ideas? Thanks.