繁体   English   中英

引用的汇编不是相同的版本?

[英]Referenced assembly is not the same version?

这是使用nhibernate的asp.net MVC 3应用程序。

在我的proje1.Data程序集中,我拥有所有与nhibernate相关的代码,并且还包括一个用于处理会话的HTTP模块。

我必须引用System.Web,因为它需要访问HttpContext,并且在添加System.Web之后出现以下错误。

我很困惑,因为这是一个新项目,而且一切似乎都是.NET 4.0

Warning 5   The referenced assembly "E:\dev\proj1\src\proj1.Data\bin\Debug\proj1.Data.dll" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.    ConsoleTest

您的proj1.Data项目是否针对“ .NET Framework 4客户端配置文件”而不是“ .NET Framework 4”? 您可以通过检查该项目的属性来进行检查。 它将在“应用程序”选项卡的“目标框架:”下列出。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM