pluginsjson.netdynamics-crmdynamics-365ilmerge

System.OutOfMemoryException when merging Newtonsoft.Json


I am creating a plugin to call a webservice. I need to serialize and deserialize the Json object. So, I need Newtonsoft.Json. I am trying to merge the dll from NewtonSoft.Json and my application dll using ILMerge.MSBuild.Task and ILMerge in Visual Studio 2015.

I get the error below: enter image description here

I looked for solution in internet but could not find any solution.


Solution

  • For ILMerge in VisualStudio Use the necessary dlls from NuGet Package Manager Only

    I was using the MSBuild.ILMerge.Task 1.0.5 and latest verson of Newtonsoft.Json and getting this type of issue.

    I tried with to stable version by downgrade to Newtonsoft.Json version 10.0.3 and it works well.

    Hope this helps!!!