栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

【已解决】Could not load file or assembly ‘System.Net.Http, Version=xxx, Culture=neutral...

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【已解决】Could not load file or assembly ‘System.Net.Http, Version=xxx, Culture=neutral...

文章目录
  • 问题
  • 解决


问题

系统开发完进行生产环境测试时出现错误:

英文版:
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
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/904637.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号