0

I am using TFS server and just get all the latest version from the server and when I run the code it show newtonsoft.json doesn't match with the dependency. So I remove it and just install it again (latest version 9.0.1). But when I right click on the newtonsoft.json property it shows version 4.5.0 (shown in the below image) enter image description here

And when I run this program I got this error

"An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

enter image description here

I tried the all steps from the following link
How can I fix assembly version conflicts with JSON.NET after updating NuGet package references in a new ASP.NET MVC 5 project?

Community
  • 1
  • 1
Merbin Jo
  • 1,189
  • 1
  • 11
  • 19

1 Answers1

0

try to update the library.Right the below command in package manager console.

Update-Package –reinstall Newtonsoft.Json
Naveed Khan
  • 338
  • 4
  • 16