Fluent NHibernate
Rake Script

Fluent NHibernate is distributed with a Ruby Rake script, which can be used to build without having to open Visual Studio; more importantly, it also provides a simple mechanism for switching versions of NHibernate (see Supported NHiberate Versions for more details on our versioning policy).

Building with rake

Before you can run the rake script, you need to make sure you have all the necessary gems installed; the easiest way to do that is to run the InstallGems.bat distributed with Fluent NHibernate.

Once you've got all the gems installed, you can either run Build.bat which just runs rake, or you can run rake directly: rake. Either of those will use MSBuild to build the solution, and then will run the unit tests before copying the built files to the build directory.

When the build is complete, you can reference the Fluent NHibernate binaries from the build directory.

Switching versions

The rake script has the capability to switch which version of NHibernate it builds against. Currently we have support for 2.0.1GA and a slightly out of date version of trunk (useful, I know).

To build against a different version, you need to specify which version when calling rake.

For 2.0.1GA you can either just call rake, because it's the default, or to build it explicitly you can use:

rake default

For the 2.1 trunk of NHibernate, you can use:

rake nhib21

Updating trunk

The trunk of NHibernate is always going to be ahead of Fluent NHibernate, and we cannot keep it up to date; so the easiest way for you to do it yourself is to replace the contents of tools/NHibernate/nhib2.1 in your Fluent NHibernate directory. If you then run the above command for 2.1, it'll use your latest copy.

There's a big but when using trunk, we don't officially support it; there probably will be some breaking changes in trunk at some point that we won't be able to accommodate for.