【发布时间】:2014-04-25 18:37:52
【问题描述】:
我收到错误消息
System.IO.FileLoadException:无法加载文件或程序集 'Newtonsoft.Json,版本=4.5.0.0,文化=中性, PublicKeyToken=30ad4fe6b2a6aeed' 或其依赖项之一。这 定位程序集的清单定义与程序集不匹配 参考。 (HRESULT 异常:0x80131040)
对于我的 CI 构建
我尝试过的解决方案
<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>
它也没有工作
【问题讨论】:
-
该错误意味着 .NET 找不到 Json.NET 库。 Do you have it installed?
-
完全相同的问题 - 让我发疯。如果您找到解决方案,请告诉我
-
实际上,对我来说,添加您尝试的方法解决了问题。
-
使用 NuGet 包管理器中的合并选项确保版本不会分开。