You got mono!

May 25, 2008 | by Geoff

One of our recent projects has a .NET backend (with a JavaScript frontend). As we use macs for our dev platform, this means dual booting or using parallels in order to fire up Visual Studio to work on and debug the backend using the embedded ASP.NET server … until now.

The other day, out of curiosity, I downloaded Mono for Mac OSX to see how it works and if it would be at all viable to use as a development tool for .NET projects. With the installation came a Mac version of the MonoDevelop IDE which supports Visual Studio 2005 solution and project file support. I thought it sounded too good to be true but decided to give it the five minute test to see what might happen. I did a fresh checkout of the codebase, fired up MonoDevelop, opened the projects solution file and unsurprisingly some things did not function. For one, we use an add-in for Web Deployment Projects which wasn’t recognized. Additionally there seemed to be some build issues when trying to locate our logging DLL. With a bit of poking (literally a few minutes) I had found that all we needed was a hint in the project file to point to our DLL and the project built – very scary. Next thing was seeing if it would run.

As it turns out, Mono comes with an ASP.NET server called xsp2. Even more interestingly, editing the properties of the web Cleint project in MonoDevelop reveals very simple integration with xsp2 as an embedded server. This was all looking too good to be true. A simple config change (ports) and then I hit run for the client project and was amazed that the thing actually came to life and seemed functional. Very shocked was I!

There was a minor problem in that our configuration service was reading files and serving them to the client but had issues with line endings given the difference between windows and mac platforms and their ideas of what a line ending should be (for the record its \n!). That was swiftly fixed and the app not only came to life but was fully functional.

Admittedly, MonoDevelop is a pretty rough IDE but the fact that it took less than 30 minutes and not much tweaking to get things working was quite a lovely surprise!

Bookmark and Share


Comments are closed.