In my planning to get ready for Mono development, I’ve been looking at different ways to get up and running. I’ll be putting together a screen cast of this work, all distilled down so hopefully you will be able to avoid some of the pain, musings, and cursing that occur during this process. Although, I can say, from my experience, that this is a characteristic that has served me well professionally: I don’t mind muddling through the uncharted stuff. BUT, it is an enormous PITA, and I can sympathize greatly with those that are not too eager to do it. I also understand it really is a matter of how interested you are in figuring it out; it being the task at hand.
The first thing we have to look at is getting an infrastructure in place that supports our development. In the Windows / Visual Studio world, a lot of that is pretty simple to get running, especially now that VS ships with a built in web server. I have always used IIS as much as possible, but the built in web server works ok for local development.
I’ve got Mono
But in Mono world, we have some different opportunities to extend our development experience. For instance, you can run Mono and Linux in a virtual machine. Here you have several options; you can pull down a Linux distribution, install it to the VM and then install Mono via the Linux Repositories. For those of you just getting into the Linux world, the Repositories are central locations from which you can choose to install other open source software packages. When I read about the Linux Repositories that immediately gave me pause, because that’s a pretty huge win for Linux. Unfortunately, I don’t think Windows could ever execute on anything like that because of the nature of the Windows ecosystem.
Another option is to install the VM from Mono that is a full openSUSE Linux distribution with Mono and MonoDevelop already installed. For those looking for speed in getting up and running, this is probably the best way to get up and running.
In my first attempts, I went with the first route because I was curious to learn some more about Linux and I wanted to see how far the distributions had come since the last time I worked with them – back in 2000.
Well, let me tell you, they have come a long way, baby.
![]()
If you’ve got the time or inclination, I highly recommend picking a virtualization software package and running some Linux distro installs and playing with them. So far I have openSUSE, Ubuntu, Ubuntu Server, and I think I have CentOS queued.
But, I do like Visual Studio and I am comfortable with it. I’ve looked at other IDE’s and for whatever reason; I don’t find them as good as Visual Studio. I recognize that may not be the case, it may be my hang up. So, I’ll be actively bouncing around IDE’s to challenge myself a bit on the IDE front. So, I’ve got a bit of a conundrum. I like Visual Studio, and I’d like to continue to develop in it, but I need a setup in my Windows environment that can support my preferred development experience. So, I started digging into how to get Mono running on my host Windows OS and what other tools I will need to support that development process.
My initial take was to look at using the XSP2 web server that is included with the Mono install. This is probably something akin to the web server that is installed as part of Visual Studio. I got things setup and working ok, but it’s a very small application and is not very robust (their words, not mine). For e-commerce I wanted to make sure I had something that was of the same caliber as IIS or better. This brings me to Apache. I’ve installed the Apache HTTP server and the install was painless and all good. I did have to turn off my IIS service because they both wanted to hog port 80. You can probably configure this to be different, and I may yet do that, but I want to “disable” my old habits as much as possible. Sometimes you have to force yourself to learn.
It looks like I’ll be able to target the Apache HTTP Server for use by Visual Studio as well, since this is in the Project Properties dialog:
Finally, I want Visual Studio to use the C# compiler for Mono, not .NET, so I figured I could do that by changing the target framework. My hope was that Visual Studio would allow me to target Mono as the development framework, and use the Mono compiler as part of that targeting process. Alas, that does not appear to be possible at this point:
So, I think I have to dig in a little deeper to find out how to control what C# compiler Visual Studio uses to see if I can change that. Presuming I can, I then need to setup the virtual directories and such in Apache so that my development experience is as seamless as possible. I don’t want to “feel” these changes, but I know there is some work to do to get the development experience to be something close to what I am used to. Note to the VS.NEXT Team – I know you’re using MEF and MSBuild under the covers, so you should be able to allow this pretty easily.
So far, all of this has been pretty painless and has been more of an exercise in “figuring things out” than anything else. The installs have been painless and have caused me no grief. Things appear to be pretty stable so far.
If anyone is going to “walk the walk” with me, I’ll be putting up some screen casts that go into more detail on all of this stuff, so you may find more info there. I’m waiting on a few key pieces for my screen cast setup that I want before I start pushing things out, but they’ll be coming pretty soon – within the next few weeks.
February 9, 2009 at 10:14 am
Maybe this will help with using mono in visual studio: http://jpobst.blogspot.com/2009/01/gmcs-in-visual-studio.html
February 12, 2009 at 5:44 am
Excellent! Thank you!
February 16, 2009 at 3:05 am
[...] does not allow you to explicitly target a framework other than the .NET framework. I cover that in this post, so if you are curious about that, then you may want to go read that first to understand where this [...]