gpt4 book ai didi

asp.net-mvc - 无法使用 ASP.NET (MVC 4) 加载文件或程序集 System.Net.Http,版本 = 4.0.0.0

转载 作者:行者123 更新时间:2023-12-01 02:19:59 25 4
gpt4 key购买 nike

我关注 Could not load file or assembly System.Net.Http, Version=4.0.0.0 with ASP.NET (MVC 4) Web API OData Prerelease

我按照你的建议步骤。我使用统一。我在 Boostrapper.Initialize 上遇到了一个问题.这个问题说 "An exception of type 'System.IO.FileLoadException' occurred in SupportCours2.dll但没有在用户代码中处理

附加信息:

Could not load file or assembly 'System.Web.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" and in the inner I have {"Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)":"System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

内部版本 4.0 很奇怪,顶部版本是 5.0

我尝试了很多东西:我跟着升级 http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2在哪里可以找到用于升级到 System.Web.Http v5.0.0.0 的 NuGet 包?并且无法加载文件或程序集 System.Net.Http, Version=4.0.0.0 with ASP.NET (MVC 4) Web API OData Prerelease

我也遵循您的建议,使用“预”版本并修改 web.config。我没有工作。

你能帮我吗?

最好的问候, 亚历山大

最佳答案

这个对我有用:
在“包管理器控制台”上写

Update-Package Microsoft.AspNet.WebApi -reinstall

关于asp.net-mvc - 无法使用 ASP.NET (MVC 4) 加载文件或程序集 System.Net.Http,版本 = 4.0.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21238892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com