当我使用Fluent NHibernate 1.0 RTM和Visual Studio 2010 beta 2时,我有一个奇怪的引用错误。基本上我尝试了以下关于Fluent NHibernate页面的入门教程,但它不能编译。 我在Visual Studio上遇到这两个引用错误:
警告1引用的程序集“FluentNHibernate”无法解析,因为它依赖于“System.Data.OracleClient,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089”,它不在当前的目标框架“.NETFramework ,版本= V4.0,外形=客户”。 TestFluentNHibernate
警告3引用的程序集“FluentNHibernate”无法解析,因为它依赖于“System.Web,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”,它不在当前的目标框架中“.NETFramework,Version = V4.0,档案=客户端”。 TestFluentNHibernate
我不明白为什么需要使用这两个程序集来使用FluentNHibernate,但我觉得它更加奇怪,它没有得到程序集。
顺便说一句,我创建了一个简单的控制台应用程序
谢谢。
I have a weird reference error when I use Fluent NHibernate 1.0 RTM and Visual Studio 2010 beta 2. Basically I have tried following the getting started tutorial on Fluent NHibernate's page and it doesn't compile. I get those two reference error on Visual Studio :
Warning 1 The referenced assembly "FluentNHibernate" could not be resolved because it has a dependency on "System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". TestFluentNHibernate
Warning 3 The referenced assembly "FluentNHibernate" 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". TestFluentNHibernate
I don't really understand why those two assembly are needed to use FluentNHibernate, but I find it even weirder that it doesn't get the assemblies.
I have created a simple console application by the way.
Thank you.
最满意答案
默认情况下,Visual C#2010的目标是“.Net Framework 4客户端配置文件”,它是完整“.Net Framework 4”的一个子集,并且缺少这两个程序集。
转到项目菜单,然后选择菜单项/您的项目名称/属性...在应用程序选项卡上更改目标框架:从.NET Freamework 4客户端配置文件到.NET Framework 4。
这是我第一个使用Visual / anything /,NHibernate,Fluent等的项目,所以花了一段时间才弄清楚,Google在任何地方找不到我的答案,所以希望这有帮助。
By default Visual C# 2010 targets the ".Net Framework 4 Client Profile" which is a subset of the full ".Net Framework 4" and is missing both of those assemblies.
Go to the Project Menu, and select menu item /Your Proj Name/ Properties... On the application tab change the Target framework: from .NET Freamework 4 Client Profile to .NET Framework 4.
This is my first project with any of Visual /anything/, NHibernate, Fluent etc so it took a while to figure out and Google couldn't find me answers anywhere, so hope this helps.
更多推荐
发布评论