The Castle project has recently got an awful lot better at actually being buildable from SVN. It used to be a nightmare. Since Fluent NHibernate doesn’t have a recognized built version, you’ve pretty much got to use the source. So you’d hope it was pretty easy. Sadly, it’s not. It’s another nightmare. Most of the problem comes from their decision to use rake.
Now, don’t get me wrong, I love rake. It is 100% the right idea for a build tool, but the story on windows sucks. For one thing, you’ve got to get ruby working on your machine. Good luck with that, since most of the installs don’t include the required files. Secondly, rake doesn’t have any extensions to deal with .NET code, which means that you end up dropping down to invoking MSBuild on the solution file anyway. This also means that you’re prey to the standard problems of building from a solution file, including references not pointing to where you thought they were pointing. (When I looked in October, FNh was suffering from exactly this problem.)
- Install the Ruby 1.8.6 one-click installer. Don’t try anything later: it probably won’t work. (Best way to get 1.9.1 working on windows is probably to install 1.8.6 and copy across the missing DLLs to the 1.9.1 install directory)
- Now go into your Fluent NHibnerate folder. Don’t run build.bat.
- Put the c:rubybin folder onto your path: set path=c:rubybin;%path% (I’m assuming you installed to the default location)
- If you’ve got a proxy server, find out what its server name and port is.
- Open installgems.bat in notepad. Add this to every “gem install” line –http-proxy http://<<server>>:<<port>>. (obviously, 80 is the default)
- Now run installgems.bat.
- Type “rake” (since that’s all build.bat does anyway)
- Hope I haven’t forgotten anything.
Anyway, Fluent NHibernate is a fabulous project, which has a project velocity the average .NET open source project would give their source repository for, so enjoy.
One thought on “Building Fluent NHibernate”
Well, you can just use the solution file, but if you’re doing anything other than a one-shot compile (and you never know when you’re going to need to go back to it) you need to get the build file working.Problem is, rake is actually rather good, so you can understand people familiar with it wanting to use it…