Tigraine
Daniel Hoelbling talks about programming

Running from trunks can be tough

May 30th, 2009 . by Daniel Hölbling

I just spent almost 10 hours running in circles collecting different releases of NHibernate, Fluent NHibernate and castle, in a rather futile attempt to make them work together.

NHibernate is currently in 2.1 Beta1 at revision 2.1.0.2001 referencing the latest Castle.DynamicProxy2 at revision 2.1.0.0.

Fluent NHibernate’s current trunk compiles against NHibernate 2.1.0.1001 that in turn is compiled against Castle.DynamicProxy2 2.0.3 thus breaking.

So, while the NHibernate Project and the Castle project managed to match their versions pretty well, the Fluent NHibernate trunk was not.

So, the obvious choice would be to just take all the assemblies that are packed with Fluent NHibernate and work from that. But by doing so I then lack Calst MicroKernel and Windsor, two libraries that are not packed with Fluent NHibernate.

At that point I gave up and simply recompiled the Fluent NHibernate trunk with the latest NHibernate trunk.

In case you need Fluent NHibernate with Castle Windsor i packed my results for you: FluentNHibernateWithCastle.7z

Hope this helps.


  • http://mrpmorris.blogspot.com Peter Morris

    Hi

    I have just downloaded the trunk for NH and tried to get it to compile but it misses the assemblyinfo.cs files.

    I have looked at a couple of pages explaining how to build the NH trunk, but both seem old and neither worked.

    I don’t suppose you fancy writing an updated document based on your recent experiences do you?

  • http://www.tigraine.at Daniel Hölbling

    Hi Peter.
    I guess you tried building the NH trunk using MSBuild.
    That doesn’t work. Both NHibernate and Castle are using NAnt for their build scripts, so you just need to install NAnt and run the script.
    I’ll write a brief overview about installing NAnt and Rake (Rake is the build system for Fluent NHibernate).

    Btw.. If you just need the current trunk you’ll find it in my library package.

    greetings Daniel

  • http://ultramagnus.org Stephen Pope

    I had similar pain with Fluent NHibernate .. I grabbed the latest build of Castle to get the NHibernate Facility from the castle TeamCity build server (which is built against NH 2.1.0.1003) .. so this wouldnt work with FluentNH. So I grabbed the source of FluentNH and dropped in the NH 2.1.0.1003 Dll .. I found that some types like Oracle9 => Oracle9i had been renamed and an Execute method now had one less argument (which I couldnt work out which one had been removed !) .. so I had to abandon FluentNH until Ive got time to work out what that removed param was :D

  • http://www.tigraine.at Daniel Hölbling

    Hi Stephen,
    yes I had those troubles too. They changed something in their API but I could fix it and recompile.

    The new BuildSchema method looks like this:
    new SchemaExport(configuration)
    .Execute(script, true, false, session.Connection, null);

    I didn’t want to post a patch with the changes since I don’t know how they did it so they can compile against 2.1 and 1.2 (some rake magic I guess)

  • http://www.tigraine.at/2010/08/25/the-fastest-way-to-install-dotless-nubular-nu/ Tigraine » Blog Archive » The fastest way to install dotless : nubular (nu)!

    [...] you know that dependency management in the .NET open source space really sucks? For a long time have we been looking at Ruby Gems in envy of the ease of use and simplicity, [...]