I am using the 1.0 RTM of Fluent Nhibernate, with a 3.0 build of NHibernate. In order to do this, I need to add the following to my .config file:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NHibernate" culture="neutral" publicKeyToken="aa95f207798dfdb4"/>
<bindingRedirect oldVersion="2.1.0.4000" newVersion="3.0.0.1001"/>
</dependentAssembly>
</assemblyBinding>
This works great when running integration tests with the TestDriven.net plugin, but fails in the NUnit gui or console runner with the following error:
System.IO.FileLoadException : Could not load file or assembly 'NHibernate, Version=2.1.0.4000, 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)
How do I get NUnit to respect my bindingRedirect and run my integration tests successfully?