I developed a Dynamics 365 Plugin to call SPO APIs. System.Web.Helpers.dll is used to parse JSON data returns from SPO APIs. ILMerge is used to merge the hlpers dll with my plugin. When running the plugin. it threw an error in initializing the helpers dll.
Any ideas how to fix it?
Thanks
Runner288
The type initializer for 'System.Web.Helpers.Json' threw an exception
Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): SpoCrud.ShareDocByCaseTypeAndRecipient: System.TypeInitializationException: The type initializer for 'System.Web.Helpers.Json' threw an exception.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>0a14c5ab-6440-4be8-86b2-1f0520f88d36</ActivityId>
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): SpoCrud.ShareDocByCaseTypeAndRecipient: System.TypeInitializationException: The type initializer for 'System.Web.Helpers.Json' threw an exception.</Message>
<Timestamp>2019-02-15T20:33:27.0738763Z</Timestamp>
*This post is locked for comments