Hello,
I'm trying to register an Action with InArguments of type EntityReference. The only change is that the assembly is ILMerged and references to other assemblies. With InArgument of type string, the assembly is registered successfully but same for InArgument of type EntityReference, it throws below error.
Non-ILMerged assembly with InArgument of type EntityReference workes fine. Please suggest if I'm missing anything. Thanks!
Error:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The type InArgument`1 of the property OpportunityRecord is not supported.
Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
<ErrorCode>-2147200995</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>The type InArgument`1 of the property OpportunityRecord is not supported. </Message>
<Timestamp>2018-01-24T05:19:38.711107Z</Timestamp>
<InnerFault>
<ErrorCode>-2147200995</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>The type InArgument`1 of the property OpportunityRecord is not supported. </Message>
<Timestamp>2018-01-24T05:19:38.711107Z</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 Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin)
at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()
InArgument Declaration:
[Input("OpportunityRecord")]
[ReferenceTarget("opportunity")]
public InArgument<EntityReference> OpportunityRecord { get; set; }
[Input("AccountRecord")]
[ReferenceTarget("account")]
public InArgument<EntityReference> AccountRecord { get; set; }
[Input("ContactRecord")]
[ReferenceTarget("contact")]
public InArgument<EntityReference> ContactRecord { get; set; }
[Input("OperationType")]
public InArgument<string> OperationType { get; set; }
*This post is locked for comments