2

I had a working IL-Repack post-build task in my project. Recently, I updated a number of libraries and now I have an issue that I cannot figure out.

My project uses Newtonsoft.Json and I have updated it to v12. My script is setup to take all dlls from the bin directory and merge them. When it gets to a certain dll (Twilio in this case), it gives this exception.

Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Newtonsoft.Json, version=10.0.0.0, ...'. So I'm assuming that dll is looking for the Newtonsoft.Json but is getting confused by version?

Running the program from Visual Studio does not have any issues. Twilio requires Newtonsoft.Json 10+, so version 12 is ok. How do I get IL-Repack to recognize the v12 Newtonsoft? I can see that I've added Newtonsoft.Json for merge before Twilio is added.

This is for .net 4.7.2. IL-Repack 2.0.18 (current)

Luke Bailey
  • 129
  • 1
  • 4
  • I don't know if it is the same issue, but take a look at [this answer](https://stackoverflow.com/a/74038729/4828907). – Luke Oct 12 '22 at 08:47

0 Answers0