Build warnings?

How can I resolve these assembly reference warnings?

System.Net.Http.Formatting.dll: Warning CS1701: Suppose the assembly reference 'Newtonsoft.Json, Version = 4.5.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' matches' Newtonsoft.Json, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed ', you may need to provide the Newtonsoft.Json.dll runtime: (Location of the symbol associated with the previous warning)

+3


source to share


1 answer


Try adding the file bindingRedirect

to your application web.config

.



<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

      

0


source







All Articles