05.02.2008

Mono in VS2005 – Celebrations

posted by Karsten

Mono in VS2003 is a piece of cake, because there is an installer, and a community of users who have shaved all the problems away.

Sadly Mono in VS2005  is not that simple, and has given me considerable aggrevation, but I've now finally got a running add-in in VS2005. Following is an bullet point list of what I did to achieve this milestone:

  1. Have mono installed, thanks P@ 😉
  2. Download vsAddin2005 from http://anonsvn.mono-project.com/viewcvs/trunk/wintools/vsAddIn2005/ (Rob found this library)
  3. Open the solution in VS2005
  4. Open monoaddin.Addin and change the path in <Assembly> to the path you are using
  5. Build everything
  6. Copy all files from BinAndLib to the folder where your assembly is. (The code checks if they arein that folder. This surely most be a bug, because it would be enough to have them in the path.)
  7. You need all files from the folders BinAndLib and reflib somewhere in your path, e.g. system32. (Could also add the folders to the path)
  8. Start VS2005
  9. Go to Tools->option, under environment->Add-in/Macros security add the folder which has monoaddin.Addin
  10. Go to Tools->Addin manager…
  11. tick all the options of the monoaddin
  12. Open a solution and you can celebrate :o)
Share

8 Responses to “Mono in VS2005 – Celebrations”

  1. Karsten Oster Lundqvist says:

    Unfortunately it doesn't seem to like VB.Net at all…

  2. P@ Parslow says:

    For those who are feeling particularly mentally challenged, please note that you also have to have mono installed on your machine.  Otherwise, you might wonder why the addin doesn't work until you realise.  Not that I forgot I had uninstalled it, of course, oh no…

  3. Karsten Oster Lundqvist says:

    Additional info:

    VB.Net works as well. Unfortunately System.deployment is not fully implemented in Mono yet, and as VB.Net standard windows solution adds it by default mono can't compile, hence the not running solution above.

  4. P@ Parslow says:

    Interesting… a quick test app I just did includes system.deployment but it runs just fine (a little slower than in .NET but nothing to grumble about really) – however, I create a deployment unit (crashes)

    I guess one of us must have a strange VS install? 

  5. Karsten Oster Lundqvist says:

    There seems to be an easier way, which I overlooked the first time around.

    Paco has already included the addin in the latest gtk# win32 installer at http://developer.novell.com/wiki/index.php/Gtk_sharp_Win32_Installer_for_Microsoft_.NET_Framework_1.1_SDK

    I somehow overlooked that this isn't part of official mono/gtk# installer, and has to be installed after mono.

  6. Karsten Oster Lundqvist says:

    Yes – the easier way works!

    My confusion arose due to the wording on Novell's download pages. The mono download does not include GTK# for .NET only GTK# for mono, hence to get the visual studio assemblies installed developers also need to install the GTK# for .NET. 

  7. Selva kumar.A says:

    yes it works very thanks

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment