开发者

Referenced assembly is not the same version?

This is a asp.net MVC 3 application using nhibernate.

In my proje1.Data assembly I have all my nhibernate related code, and that also includes a HTTPmodule that handles the session.

I had to reference System.Web because it needs access to HttpContext, and after I added System.Web I am getting the below error.

I'm confused as this is a new project and everything seems to be .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开发者_JAVA技巧 targeted framework or consider retargeting your project.    ConsoleTest


Is your proj1.Data project targeted for ".NET Framework 4 Client Profile" instead of just ".NET Framework 4"? You can check this by checking the properties for that project. It will be listed under "Target framework:" in the Application tab.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜