Issues with the release of NewtonSoft Json Assembly

I get an error with NewtonSoft JSON when trying to create my application.

Error 4 Assembly 'System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' which has a higher version than referenced assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' 

Please help me in resolving this issue.

+5
source share
3 answers

Change your project to a link to JSON.NET version 6, because you need another dependency ( System.Web.Http ) that it needs. You cannot use two versions of the same assembly in the same project.

You can get the latest version (6) using NuGet . Run this in the package manager console:

 PM> Install-Package Newtonsoft.Json 
+10
source

from the Nuget package manager you can install a specific version of the dll

0
source

Everything that I did was edited by a csproj file, identifying the versions with two versions of NewtonSoft, I deleted one of the versions from csproj and saved the file. This is fixed.

0
source

Source: https://habr.com/ru/post/1206615/


All Articles