Hello,
When I try to run my custom workflow code that uses the reference System.Text.Json to deserialize a Json file, I get this error. If I understand correctly this is not supported inside CRM? I tried googling it, but I got a lot of mixed answers. Some where about using Newtonsoft.Json with ILmerge. Some other said that I Newtonsoft is not supported, but that System.Text.Json should be fully supported. So my question is how do I deserialize a json file in a custom workflow in CRM 2016?
Thank you
addition info:
System.Text.Json seems to require netcore version 4.6.1 so that's the one that I used.
I am using CRM 2016
Here is the error message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unexpected exception from plug-in (Execute): APISync.CRMConnector: System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Unexpected exception from plug-in (Execute): APISync.CRMConnector: System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.</Message>
<Timestamp>2020-09-21T20:51:48.2706629Z</Timestamp>
<InnerFault i:nil="true" /