title: How do I use Fluent NHibernate with .NET 4.0?
body: <p>I want to learn to use Fluent NHibernate, and I'm working in VS2010 Beta2, compiling against .NET 4, but I'm experiencing some problems.</p>
  
  <p><strong>Summary</strong><br>
  My main problem (at the moment) is that the namespace <code>FluentNHibernate</code> isn't available even though I've imported all the .dll assemblies mentioned in <a href="http://wiki.fluentnhibernate.org/Getting_started#Your_first_project" rel="nofollow noreferrer">this guide</a>.</p>
  
  <p><strong>This is what I've done:</strong><br>
  1. I downloaded the Fluent NHibernate source from <a href="http://github.com/jagregory/fluent-nhibernate" rel="nofollow noreferrer">here</a>, extracted the .zip and opened the solution in VS. A dialog asked me if I wanted to convert the solution to a VS2010 solution, so I did.<br>
  2. I then went into each project's properties and configured all of them to compile for .NET 4, and built the entire solution.<br>
  3. I copied all the .dll files from <code>/bin/Debug/</code> in the FluentNHibernate to a new folder on my local hard drive.<br>
  4. In my example project, I referenced <code>FluentNHibernate.dll</code> and <code>NHibernate.dll</code> from the new folder.</p>
  
  <p><strong>This is my problem:</strong><br>
  If I right-click on <code>FluentNHibernate</code> in the References list and select "View in Object Browser...", it shows up correctly.</p>
  
  <p>Now, when I try to create a mapping class, I can't import <code>FluentNHibernate</code>. This code:</p>
  
  <pre><code>using FluentNHibernate.Mapping;
  
  namespace FluentNHExample.Mappings
  {
  
  }
  </code></pre>
  
  <p>generates an error on the using statement, saying</p>
  
  <blockquote>The type or namespace 'FluentNHibernate' could not be found (are you missing a using directive or an assembly reference?).</blockquote>
  
  <p>The <code>FluentNHibernate</code> assembly is still in the list of References of my project, but if I try to browse the assembly in Object Browser again, it can't be found.</p>
  
  <p><strong>What is causing this?</strong></p>