- 问题
- 解决
问题
系统开发完进行生产环境测试时出现错误:
英文版:
Could not load file or assembly ‘System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
中文版:
未能加载文件或程序集“System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
在 Microsoft Visual Studio 中双击打开System.Net.Http.dll,再双击打开1 [非特定语言]:
在启动项目的web.config或app.config中添加以下配置
完整结构:
这里使用了 版本重定向
拓展阅读:
- 解决办法:Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging
- How the Runtime Locates Assemblies | Microsoft Docs
- c# - Could not load file or assembly 'System.Net.Http - Stack Overflow



