Fashion of the week - Building with Rake

Here & There I have been seeing people using Ruby’s build system rake in their .NET open source projects instead of NAnt or MSBuild.

I don’t really feel like commenting this fact here, but it is slightly annoying that people expect us to know ruby and do not write a single line about the fact that their build system actually requires an environment that has nothing to do with .NET.

Thankfully the last part is not quite true anymore. The Dynamic Language Runtime (DLR) is slowly coming into mainstream with the first .NET 4.0 beta made available.

IronRuby is being developed to run on the DLR and there is already work to make it run with the 4.0 Beta.

Unfortunately, important dependencies are not part of this release such that my attempt to get rake running didn’t work out.

I tried it with the current IronRuby release. I suppose it doesn’t make any use of the Beta 1 things of the 4.0 framework, but you can get the idea… Ironruby makes rake available in the form of irake, and gem (the installer of libraries in ruby) as igem. In retrospect I am uncertain if I needed it, but I performed an igem install rake in order to call irake on the system.

I tried the setup on Jeremy Miller’s storyteller project, which contains a rake file for building. Once I removed a dependency in BuildUtils.rb to the module FileTest (which seems to exist in the ruby 1.9 core library, however I cannot really pinpoint it) the rake file walked through without issues.

Armed with this setup you should be able to fend the latest fashion in .NET solution building!