I am getting an error with NewtonSoft JSON when I try to build 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.
Yet Newtonsoft. Json was basically scrapped by Microsoft with the coming of . NET Core 3.0 in favor of its newer offering designed for better performance, System.
Text. Json library is included in the runtime for . NET Core 3.1 and later versions. For other target frameworks, install the System.
Over 1 billion downloads and counting, Json.NET is the number one library on NuGet.
Change your project to reference to JSON.NET version 6 since you use another dependency (System.Web.Http
) that needs it. You can't use two versions of the same assembly in one project.
You can get the latest version (6) using NuGet. Run this in your package manager console:
PM> Install-Package Newtonsoft.Json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With