Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which version of fluent nhibernate is compatible with nhibernate 3.2

i see when i install fluent nhibernate 1.2 from Nuget, it downloads nhibernate 3.1. If i want to use nhibernate 3.2, how would i do that through nuget and it is compatible with fluent nhibernate 1.2 ?

like image 689
leora Avatar asked Jul 04 '11 14:07

leora


3 Answers

If you use the Nuget Package Manager Console instead of the GUI to get the package (Install-Package FluentNHibernate) you will get version 1.3.0.717 which is compatible with NHibernate 3.2 enter image description here

I tried it and is working fine for me.

like image 126
Ajadex Avatar answered Nov 03 '22 08:11

Ajadex


Here you can read about plans to release FluentNHibernate for 3.2GA soon and a suggested workaround using attributes

http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/8e782e45ed9ba647

I got my working using

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="NHibernate"
                      publicKeyToken="aa95f207798dfdb4"
                      culture="neutral" />
    <bindingRedirect oldVersion="3.1.0.4000"
                     newVersion="3.2.0.4000"/>
  </dependentAssembly>
</assemblyBinding>
like image 41
Valentin Kuzub Avatar answered Nov 03 '22 09:11

Valentin Kuzub


Currently, the FluentNHibernate package from the offical NuGet package source, depends on NHibernate.Castle 3.1 (currently, there is no newer version yet), which in turn depends on NHibernate 3.1 (the exact version, not 3.1 or higher). Therefore, NuGet infers a dependency on NHibernate 3.1 when installing FluentNHibernate.

So the bottom line is: you can't, until the FluentNHibernate package is updated.

The most practical way around is getting the latest FluentNHibernate source code and building it against NHibernate 3.2. I've tested that and it seems to work just fine. You might even be fine using assembly binding redirects, but I haven't tested that.

Alternatively, you can wait for NHibernate 3.2 to reach GA (final) and FluentNHibernate to catch up, but of course that's not a very satisfying answer.

like image 4
Sandor Drieënhuizen Avatar answered Nov 03 '22 08:11

Sandor Drieënhuizen