MSBuild.ILMerge.Task assembly reference conflict

194 Views Asked by At

I have a class library "LibraryA" where i use MSBuild.ILMerge.Task (v1.1.3) to merge all referenced library such as Newtonsoft.Json v13.0.1.

All work fine and in bin folder i find only a "LibraryA.dll" file.

In the solution i have added a new console project to test "LibraryA". I have added the reference to "LibraryA" and i can run the test project.

Now i have to use Newtonsoft.Json v13.0.1 in test project. I have added the reference by installing the package with NuGet Packeage Manager, i have added using statement and visual studio has 0 errors, but when i run test project i have this error:

error CS0433: The type 'JToken' exists in both 'LibraryA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

0

There are 0 best solutions below