I have Asp.net WebApi project. I have added reference to Newtonsoft.json 7.0.0 in my project. But I am constantly getting an error
'Newtonsoft.Json, Version=4.5.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)
I have no reference to this library (version) anywhere in my project. In fact all the dependent libraries are using newtonsoft.json version 7.0.0 . So what is the reason for this error? This is line that is crashing.Removing this line does not help either.
HelpPageConfig.Register(GlobalConfiguration.Configuration);
Any suggestions?
Could you provide more details about your project? What are the HelpPageConfig and GlobalConfiguration objects? Are they in the same project? How did you add this library to your project? Was it via NuGet Package Manager?
It seems to me that one of the units involved has a reference to an older version of NewtonSoft.
I would try to consolidate those versions via the "Manage NuGet Packages for Solution" option by right clicking your solution. This will remove older versions of the library and will keep only the version chosen in the NuGet package console.
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