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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With