This came up again today, and I wasn’t sure if everyone was aware of it.
Fluent NHibernate can build against NHibernate 2.0 (release) or the 2.1 (trunk).
It will swap out the binaries in the tools/NHibernate folder to the appropriate version.
This means two things:
1.) Doing a re-build solution in VS2008 will pick up the different version of the binaries (most of the time)
2.) Doing a compile task from Rake will build against the current version of the binaries
There are two tasks in the Rake script you should know about:
> rake use_nhib_20
> rake use_nhib_21
These internally call the “switch_nhib_libs(…)” method (i.e. switch_nhib_libs(‘nhib2.0GA’))
As new versions come out (let’s say nhib_22GA), simply add a new task to the Rake script:
desc “… description …”
task :use_nhib_22 do
switch_nhib_libs(‘nhib2.2GA’);
end
Then make sure you put the NHibernate 2.2GA binaries into the tools/NHibernate/nhib2.2GA folder.
-Chad