如何解决此程序集引用警告?装配参考警告?
System.Net.Http.Formatting.dll:警告CS1701:假设集引用 'Newtonsoft.Json,版本= 4.5.0.0,文化=中性 公钥= 30ad4fe6b2a6aeed' 匹配“Newtonsoft.Json, 版= 6.0.0.0,文化=中性公钥= 30ad4fe6b2a6aeed”, 您可能需要提供运行时策略Newtonsoft.Json.dll:(位置与先前警告符号的 )
如何解决此程序集引用警告?装配参考警告?
System.Net.Http.Formatting.dll:警告CS1701:假设集引用 'Newtonsoft.Json,版本= 4.5.0.0,文化=中性 公钥= 30ad4fe6b2a6aeed' 匹配“Newtonsoft.Json, 版= 6.0.0.0,文化=中性公钥= 30ad4fe6b2a6aeed”, 您可能需要提供运行时策略Newtonsoft.Json.dll:(位置与先前警告符号的 )
尝试添加bindingRedirect
您应用程序的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>
尝试更新软件包。 Update-Package Newtonsoft.Json – Sandeep