我正在使用随 NuGet 安装的 linqtotwitter (v3.0.3)。
它与 VS2012 .NET 4.5 一起工作
但是当我尝试部署时,在运行时出现这个错误;
Could not load file or assembly 'System.Net.Http.Primitives, ... or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
System.Net.Http.Primitives.dll 在文件夹中。
有什么想法吗?
最佳答案
我刚刚解决了同样的问题。查看您的本地 web.config 并查看已添加到运行时 > assemblyBinding 部分的内容。
我将其添加到我的实时 web.config 中并解决了问题。
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.22.0" newVersion="4.2.22.0" />
</dependentAssembly>
关于c# - 无法在已发布的可执行文件上加载文件或程序集 System.Net.Http.Primitives,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23855249/