NewtonSoft.Json assembly does not match NewtonSoft.Json assembly does not match json json

NewtonSoft.Json assembly does not match


A common cause of this sort of error is a dependent assembly trying to find an assembly in a version that you do not have. Let's say you use ProjectX and ProjectX required Json.NET 6, and you only have version 6.0.5. That would cause a problem. You can either install the required version or use assemblyBinding.

assemblyBinding allows you to serve a version that is different fro the version requested. The requested version is oldVersion and the served version is newVersion.

Try this:

  <dependentAssembly>    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />    <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.5" />  </dependentAssembly>

If the numbers in the above snippet don't match, try to tweak them until it does.


Great resolved my problem:-)Instructions:First find which version of Newtonsoft.Json installed (check in package.config file) and old version should be 0.0.0.0-6.0.0.0 and newVersion = "which you installed"

<dependentAssembly>        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.4" />      </dependentAssembly>