I have created a custom workflow activity which i want to use along with my plugins. I am successfully able to register both the plugins and activity when i create each of them under separate projects and then register the assemblies one by one on my organization in the database.
Now, i want to merge both my plugins and the custom workflow activity into 1 assembly and register them again in the database. For this i included the custom activity also in the existing project of the plugins.
I am using the plugin registration tool, it registers my plugins successfully but is unable to register the activity. Here is the error i am getting this error : "Exception retrieving custom activity info - Exception has been thrown by the target of an invocation"
Here is the full log :
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Exception retrieving custom activity info - Exception has been thrown by the target of an invocation. Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><ActivityId>ef4dcf8f-06fe-4aac-aa6b-d38b87879353</ActivityId><ErrorCode>-2147200995</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" /><Message>Exception retrieving custom activity info - Exception has been thrown by the target of an invocation.</Message><Timestamp>2017-10-03T13:10:28.9635097Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true" /><InnerFault><ActivityId>ef4dcf8f-06fe-4aac-aa6b-d38b87879353</ActivityId><ErrorCode>-2147200995</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" /><Message>Exception retrieving custom activity info - Exception has been thrown by the target of an invocation.</Message><Timestamp>2017-10-03T13:10:28.9635097Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true" /><InnerFault i:nil="true" /><OriginalException i:nil="true" /><TraceText i:nil="true" /></InnerFault><OriginalException i:nil="true" /><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 Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin) at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()
Using ILMerge, i am merging the following dlls with my plugins + custom activity:
Microsoft.Xrm.Sdk.Deployment.dll
Newtonsoft.Json.dll
I am not merging these assemblies :
Microsoft.Xrm.Sdk.Workflow
Microsoft.Xrm.Sdk
Microsoft.Crm.Sdk.Proxy
Is there something more i need to do to register the custom workflow activity?