title: Issuewith NHibernate, Fluent NHibernate and Iesi.Collection. What would you try next?
body: <p>I'm extremely new to NHibernate so I apologize if I missing something trivial here. I am currently working through a book titled "NHibernate 3 Beginners Guide" from packtpub. I have mostly been following the directions in the book. When I say mostly I have diverged by using MySQL instead of MSSQL and have been using NuGet rather than downloading the binaries by hand. </p>
  
  <p>I am in Chapter 2 at the moment which is the first real coding chapter. In this chapter I am building a simple WPF application to build my database schema through a button click. I have already built some POCO's for the <code>Product</code> and <code>Category</code> classes specified in the chapter. Through NuGet I have added the following references:</p>
  
  <ol>
  <li>MySQL.Data</li>
  <li>NHibernate (as a dependency automatically resolved, Iesi.Collections)</li>
  <li>Fluent NHibernate</li>
  </ol>
  
  <p>When I click the button to build my database the following code block is executed:</p>
  
  <pre><code>private const string connString = "string omitted for brevity";
  
  private void btnCreateDatabase_Click(object sender, RoutedEventArgs e)
      {
          Fluently.Configure().Database(MySQLConfiguration.Standard.ConnectionString(connString))
              .Mappings(m =&gt; m.FluentMappings.AddFromAssemblyOf&lt;ProductMap&gt;())
              .ExposeConfiguration(CreateSchema)
              .BuildConfiguration();
      }
  </code></pre>
  
  <p>Upon clicking the button I receive the following exception (<code>FileLoadException</code>): </p>
  
  <p>Outer Exception Message: <code>Could not load file or assembly 'Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</code></p>
  
  <p>Inner Exceptions Message: <code>Could not load file or assembly 'Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</code></p>
  
  <p>Here is the "Fusion Log" if that helps: </p>
  
  <pre><code>=== Pre-bind state information ===
  LOG: User = Borealis\Frito
  LOG: DisplayName = Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
   (Fully-specified)
  LOG: Appbase = file:///C:/Users/Frito/documents/visual studio 2010/Projects/NH3BeginnersGuide/Chapter2/App/Sample.UI/bin/Debug/
  LOG: Initial PrivatePath = NULL
  Calling assembly : NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: C:\Users\Frito\documents\visual studio 2010\Projects\NH3BeginnersGuide\Chapter2\App\Sample.UI\bin\Debug\Sample.UI.vshost.exe.config
  LOG: Using host configuration file: 
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
  LOG: Redirect found in application configuration file: 1.0.1.0 redirected to 4.0.0.0.
  LOG: Post-policy reference: Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
  LOG: Attempting download of new URL file:///C:/Users/Frito/documents/visual studio 2010/Projects/NH3BeginnersGuide/Chapter2/App/Sample.UI/bin/Debug/Iesi.Collections.DLL.
  WRN: Comparing the assembly name resulted in the mismatch: Major Version
  ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
  </code></pre>
  
  <p>I have tried the following and now am at a bit of a loss:</p>
  
  <ol>
  <li>Attempted upgrading Iesi.Collections through NuGet but that fails saying there isn't a version for NHibernate that is compatible. </li>
  <li>Downloading the binaries for NHibernate and FluentNhibernate and manually referenced them.</li>
  <li>Pulling the source samples from the book and copying over the DLLs in the sample. This gave me a different error that I haven't researched far enough to ask questions yet.</li>
  </ol>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>First, why would the NuGet packages attempt to look for a version 4.* dll when the versions that ship point back to 1.*? </li>
  <li>What other things should I try to get working short of getting all the source and building locally? I'm at a bit of a loss and would love some other input.</li>
  </ol>
  
  <p>Thanks in advance!</p>