mvc项目中的文件加载异常prblem [英] file load exception prblem in mvc project

查看:76
本文介绍了mvc项目中的文件加载异常prblem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的系统上运行一个项目(项目在mvc和azure中)。我能够构建项目,但它在运行时显示错误。错误信息如下: -



无法加载文件或程序集'System.Net .Http,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a'或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。 (来自HRESULT的异常:0x80131040)

I am trying to run a project on my system (the project is in mvc and azure ). i am able to build the project but it is showing error on run time .the error message is as following :-

Could not load file or assembly 'System.Net.Http, Version=2.0.0.0, 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)

推荐答案

请尝试明确添加对程序集的引用。



右键单击您的项目 - >添加参考



希望有所帮助。 :)
Please try to add reference to the assembly explicitly.

Right click your Project -> Add Reference

Hope that helps. :)


请查看您是否可以在GAC中找到程序集System.Net.Http,Version = 2.0.0.0。我想您的项目引用的版本与GAC中的版本不匹配。



在您的解决方案中,尝试找到引用程序集的项目System.Net.Http。



您将确保引用的版本和GAC中的版本匹配。
Please see if you can find the assembly 'System.Net.Http', Version=2.0.0.0 in the GAC. I guess the version referenced by your project doesn't match with that present in the GAC.

In your solution, try to locate the project where you have referenced the assembly System.Net.Http.

You will have make sure the versions referenced and that in the GAC match.


There is version problem.So Add Reference again of System.Net.Http


这篇关于mvc项目中的文件加载异常prblem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆