Hack Week 3

As part of this year's Google Summer of Code, there were two projects that got chosen that were on my personal 'to-do' list. I was happy these projects got chosen because frankly, my to-do list is not getting shorter nor are the days getting longer.

One of these is Ed Ropple's "Cloverleaf", which is an add-in to Visual Studio designed to facilitate writing and testing applications in Mono. We decided on the following features:

- Test in Mono: Clicking this would run the current solution/project on the Mono runtime on Windows.
- Scan with MoMA/Gendarme: Clicking this would run MoMA or Gendarme (which can run MoMA) on the solution/project.
- Test on Linux: Clicking this would take the solution/project output and copy it to a Linux machine or virtual machine, and automatically start it.

Ed did some great work over the summer, so for my Hack Week project I started polishing and packaging his code so we could get it into people's hands. Unfortunately, I only got "Test in Mono" done. I already use this a lot, but I think "Test on Linux" will be the one most helpful to me.

Currently, these tools are implemented as external tools, which will allow them to run in all versions of Visual Studio 2005 and 2008. In the future, we will also be making an add-in to provide additional functionality for people with the Professional editions of Visual Studio (the Express versions cannot run add-ins).

Running the project normally with the .Net runtime:


External tool options in the Tools menu:


Application launched running on Mono:


I created a .msi installer that will install the code and add the tools to the Visual Studio menu. Note that it does not remove them from the menu on uninstall yet, you will have to do that manually from the Tools->External Tools dialog. Feel free to test it out and let me know if it doesn't work for you, since it only got tested on my machine. Hopefully this will be the start of top-notch support for Mono in Visual Studio! :)

Download Install File

Prerequisites:
- Visual Studio 2005 or 2008.
- Mono for Windows installed.

Comments

ether said…
Could the "Test with Mono" be used to fire up unit testing in mono? I currently build in VS, then deploy my tests to a linux machine to run the tests. If I could run my test suite straight out of VS inside of mono, that would be incredibly helpful. thanks!
Jonathan Pobst said…
Right now it will run any executable it finds in your solution. (If there are multiple ones, it prompts you for which one to run.)

So you would need your tests to be runnable as a executable. Also, it currently doesn't have any mechanism to launch with command line arguments, so you cannot rely on that either. (I would think command line args will definitely be a feature in the future.)
Anonymous said…
Is there any special configuration needed? I'm running VS2008, Vista and Mono prev2 and when I click Run in Mono nothing happens. (When running direcly from mono command prompt app works ok).
Jonathan Pobst said…
There shouldn't be any configuration needed. I updated the install file to produce a debug.log file in the Cloverleaf install directory. If you could try it with that version and send me the log file, I'll see if I can figure out what's wrong. (monkey at jpobst dot com)

Thanks!
Ed Ropple said…
jpobst--

Cool stuff. I'm working on the add-in stuff over the next few days.

Where exactly are these changes going to be hiding out? I'm not done on this project by a long shot. ;)

-Ed
Anonymous said…
OK, I know what's happening. There is a bug in Cloverleaf but that has nothing to do with being unable to launch application. The problem is that I have tested console application, it gets run but no terminal window is displayed, could it be fixed I really like the idea of being able to test in mono directly from VS
Jonathan Pobst said…
Yuck, that's a problem. I was testing with a winforms application. I'll look into it further. Thanks for figuring it out!
Anonymous said…
i tryed it on my company (newDream.nl) laptop and it worked great. i needed to reinstall VS and so i upgraded to VS2008 to bad it doesn't work on it.

i'm developing a service for my webserver (linux) and it is great to test it on windows with mono this easy.
MusikMonk said…
First of all, thanks for the great effort!
I was looking forward to trying this out but seems like the link is as dead as they get. And had no luck finding alternative mirrors...
Ed Ropple said…
Amarus--

You can get a mirror of the installer at:

http://projects.edropple.com/cloverleaf.msi

Popular posts from this blog

Introducing Pinta

The Big Finale