When I try to publish my site that I'm logged into, on my company's server, this error message appears:
"Error 2 Could not load the file or assembly 'Newtonsoft.Json, Version = 9.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. The definition of the localized assembly manifest does not match the assembly reference. (Exception of HRESULT: 0x80131040) ASPNETCOMPILER 0 0 RIDmvc"
I need help!
Most of the time this error happens because of different assemblies are dependent on specific version of some other assembly. The easiest fix is to update all packages that are dependent to
Newtonsoft.Json
using thenuget package manager
.Go to TOOLS > NuGet Package Manager and Select Package Manager Console.
Execute the following two commands:
Hope it should work but still if you have the same problem you can execute this in your package manager console:
Similar posts: post-1, post-2
Refer this post and Microsoft Application Lifecycle Management.