Building Fluent NHibernate

Friday, May 15, 2009 2:07 PM

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:\ruby\bin folder onto your path:  set path=c:\ruby\bin;%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.

Technorati Tags:
Comments
Gravatar
# re: Building Fluent NHibernate
Posted by Swampy on 5/29/2009 2:48 PM
Thanks alot...this worked like a charm.

Cheers!
Gravatar
# re: Building Fluent NHibernate
Posted by Chris on 7/27/2009 3:35 PM
This was very helpful. Thanks for doing it. But honestly... all this just to build a project that's written in VS / .NET anyway?

Messy!
Gravatar
# re: Building Fluent NHibernate
Posted by Julian on 8/9/2009 5:54 PM
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...
Something to add?

Talking sense? Talking rubbish? Something I'm missing? Let me know!

Fields denoted with a "*" are required.

 (will not be displayed)

 
Please add 3 and 5 and type the answer here:

Preview Your Comment