I want to learn how to use Fluent NHibernate, and I work in VS2010 Beta2, compiling against .NET 4, but I am having some problems.
Summary
My main problem (for now) is that the namespace is FluentNHibernatenot available, although I have imported all the .dll assemblies mentioned in this guide .
This is what I did:
1. I downloaded the Fluent NHibernate source from here , extracted the .zip and opened the solution in VS. The dialog asked me if I want to convert the solution into a VS2010 solution, so I did.
2. Then I went into the properties of each project and configured them all for compilation for .NET 4 and built the whole solution.
3. I copied all the DLL files from /bin/Debug/in FluentNHibernate to a new folder on the local hard drive.
4. In my example project, I referenced FluentNHibernate.dlland NHibernate.dllfrom a new folder.
This is my problem:
If I right-click on FluentNHibernatethe "Links" list and select "View in Object Browser ...", it will display correctly.
Now, when I try to create a mapping class, I cannot import FluentNHibernate. This code:
using FluentNHibernate.Mapping;
namespace FluentNHExample.Mappings
{
}
generates an error in the using statement by saying
Could not find FluentNHibernate type or namespace (are you missing the using directive or assembly references?).
The assembly FluentNHibernateis still in the link list of my project, but if I try to view the assembly again in the Object Browser, I cannot find it.
What causes this?
source
share