Original error with Fluent NHibernate 1.0 RTM and Visual Studio 2010 beta 2

I have a strange reference error when I use Fluent NHibernate 1.0 RTM and the beta version of Visual Studio 2010. I basically tried to follow the tutorial that started on the Fluent NHibernate page and it does not compile. I get these two link errors in Visual Studio:

Warning 1 The linked assembly "FluentNHibernate" cannot 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 target environment ".NETFramework, Version = v4.0, profile = Client ". TestFluentNHibernate

Warning 3 The linked assembly "FluentNHibernate" cannot be resolved because it has a dependency on "System.Web, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a, which is not in the target environment." NetFramework, Version = v4 .0, profile = Client ". TestFluentNHibernate

I don’t understand why these two assemblies are necessary for using FluentNHibernate, but I find it even stranger that it does not receive assemblies.

By the way, I created just a console application.

Thanks.

+4
source share
2 answers

By default, Visual C # 2010 targets the .Net Framework 4 Client Profile, which is a subset of the full .Net Framework 4 and both of these assemblies are missing.

Go to the project menu and select the menu item / Your name / Proj properties ... On the application tab, change the Target structure: from the .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 find out, and Google could not find the answers anywhere, so I hope this helps.

+14
source

@David,

Thank you, your comment was a lifesaver.

Strange, however, yesterday my project went perfectly, made a re-creation today and BAM, 29 errors for everyone, not finding the NHibernate / fluent / etc link.

Changing the settings you talked about helped.

0
source

All Articles