MonoRail from Castle Project is easily the most mature MVC Framework for the .NET platform. Much attention has been directed toward the MVC pattern since Microsoft's entry into the MVC space with the MVC Framework. I was encouraged this weekend at Codeapalooza in Chicago when a fellow developer expressed interest in MonoRail as part of his explorations into MVC. I've blogged about Monorail in the past and would encourage anyone looking into transitioning to MVC for you web applications that you don't dismiss MonoRail too quickly when selecting a framework.
The developer expressed that he was having a hard time getting started with MonoRail. He didn't know where to begin and he felt that some of the documentation was out of date on the site. I've found the easiest way to get started with MonoRail is to created a new project with their project template, which comes with the MSI installer. The problem that currently the MSI installer/project template is incompatible with Visual Studio 2008. If I knew a lick about that kind of thing I'd attempt to go in and fix it. Since I don't here's the workaround I do know works (since I've had to do this myself).
These steps will get you up and running with the initial Monorail web application project template (with proper references, views, controller, layouts, rescues, ect):
- Run the Castle MSI installer.
- Open Visual Studio 2005 and select to create a new MonoRail application. The template still works in the 2005 version.
- Close the solution and open in 2008. You'll be asked to upgrade the solution and project files, which you'll want to do.
That's all there is to it. It's kind of a pain to open in 2005 and the upgrade the project file, but it's the quickest way I've found around so far. This method presumes you have Visual Studio 2005 installed and if you don't the method above won't work.
Hope this helps someone out there.
I've done the steps above an re-based all references and provided the project for you to download. The project is updated to work with Visual Studio 2008 and .NET 3.5.
You can download the zip file:
09-07-2008 10:19 PM