【发布时间】:2017-01-10 23:55:45
【问题描述】:
我正在使用 TwitchLib 参考并使用 Newtonsoft.Json 7.0.0。每次我进入调用 Twitch lab 的页面时,都会收到以下错误。
无法加载文件或程序集 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
我的项目中安装了 Newtonsoft.Json,Version=9.0.0.1。
我已将此添加到我的配置中以尝试解决问题。
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
我该如何解决这个问题?
【问题讨论】:
-
..newVersion="7.0.0.0".. -
为什么你有
newVersion="7.0.0.0"和“在我的项目中安装了Newtonsoft.Json, Version=9.0.0.1。”同时? -
我手动添加了这个程序集,并从上面的 6.0.0 版本进行了复制和粘贴,但没有正确读取。