gpt4 book ai didi

asp.net - 装配引用警告?

转载 作者:行者123 更新时间:2023-12-02 17:01:41 25 4
gpt4 key购买 nike

如何解决此程序集引用警告?

System.Net.Http.Formatting.dll: warning CS1701: Assuming 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 supply runtime policy Newtonsoft.Json.dll: (Location of symbol related to previous warning)

最佳答案

尝试将 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>

关于asp.net - 装配引用警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29797208/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com