Firstly, this is not just a duplicate. None of the answers to the following questions work for me.
http://goo.gl/tS40cn
http://goo.gl/pH6v2T
I just updated all my packages using Nuget Package Manager and I started getting this error.
Failed to load file or assembly "Newtonsoft.Json, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed" or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
My Package Config has:
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
Web.config includes this piece of code:
<dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" /> </dependentAssembly>
Link Properties for Newtonsoft.Json

According to answers to similar questions, I tried the following:
- Reinstalling a package using
Update-Package –reinstall Newtonsoft.Json - Removing
dependentAssembly config from Web.config for Newtonsoft.Json - Changing
newVersion to 6.0.0.0 and 7.0.0.0 in dependentAssembly . This led to a new error. - Also tried
Get-Project -All | Add-BindingRedirect Get-Project -All | Add-BindingRedirect . It changes newVersion to Newtonsoft.Json to 4.5.0.0 . But the problem remains unresolved.
Please help me fix this.
source share