MonoDevelop on Vista64

Last night I got MonoDevelop working (to some extent) on Windows Vista x64 using the Linux binaries, tweeting my progress along the way.

UPDATE: In another 5am hacking run this evening, I've managed to build MonoDevelop fully in Visual Studio 2008, and debug at all the way to the Welcome Page, using 32-bit debugging on Vista 64. However, I'm going to have to tidy the project file fixes a lot before I commit them.

My starting point was Jonathan Pobst's zip file for MonoDevelop on Windows as a starting point for the dependencies, except GTK# which I installed using the Novell GTK# 2.12.8 installer for .NET.

I then downloaded the openSUSE 11.0 MonoDevelop trunk binaries from my openSUSE Build Service repository, since openSUSE 11.0 has GTK# 2.12, which matches the version available on Windows. I then used 7-Zip to extract the binaries from the RPM, added the dependencies. Also, since some of MonoDevelop links against Mono.Posix 1.0, whereas 2.0 was in the MD directory, I downloaded the mono-core RPM, extracted the Mono.Posix 1.0 dll, and put it in the GAC.

No luck. MonoDevelop failed to run. GTK# doesn't have a 64-bit version, so it failed to locate its glue libraries. Fortunately, Corflags.exe can be used to flag that a PE image needs to be run in 32-bit mode, so after installing the .NET SDK to get hold of this, I marked MonoDevelop.exe as a 32-bit binary and ran it. It worked!

Screenshot of MonoDevelop 1.9.2 on Windows Vista 64

I ran into many bugs, some of which Jonathan had already filed. Some are due to our assumptions about the host OS, but there are also a few subtle bugs and runtime behaviours that MD depends on, and finding these helps us to improve Mono itself.

On the whole, it was pretty successful. On my 32-bit machine I can create HTML files in MD on .NET with fully working code completion, and the code completion window even goes transparent. I'm looking forward to the day that we can offer MonoDevelop as a stable IDE and platform on Windows and MacOSX.

Comments

This is another good news for MonoDevelop on Windows. Cannot wait for an installer.

UPDATE: In another 5am hacking run this evening, I've managed to build MonoDevelop fully in Visual Studio 2008, and debug at all the way to the Welcome Page, using 32-bit debugging on Vista 64. However, I'm going to have to tidy the project file fixes a lot before I commit them.

Wow, without the need of autotools?

Yes, the build was 100% MSBuild, though I had to make a lots of tweaks to the csproj files.

Looking forward to contribute soon then to MD from my VisualStudio! :D I hate to use cygwin ;)

Hello,
congratulations, it is a great work :) Could you zip it and put it on Megaupload or a p2p network for us? I'm wishing to use it, i was ready to use SharpDevelop withouth Mono (using .NET) instead of Monodevelop because i can't get it work, and SD 3.0 hasn't a native implementation of Mono :(

Thank you.

Congratulation and hope !!!

I wait for a real Mono IDE on Windows for a long time, so I hope the installer will come as soon as possible !

MonoDevelop on .NET isn't particularly useful as a Mono tool, but there are advantages that make it worthwhile :-)

The advantages of running MonoDevelop on .NET are that it allows us to

  • debug MD on Windows
  • test the compatibility of the MD project system with VS/MSBuild
  • check compatibility of Mono/.NET
  • offer MD as a platform for building cross-platform IDEs without having a Mono dependency on Windows

Also, making it possible to build MD without autotools makes it easier for people to contribute to MD from Linux and Mac as well as Windows.

However, if you want to use MonoDevelop to write and run .NET/Mono code on Windows, you'll want to run it on top of Mono. This will come later, and when it's ready, we'll release installers.

I've been following the progress of MD on Windows for a long time now, and am very pleased to see that you are making real advances. In addition to all the reasons you state, I feel that the framework of MD will also make an excellent starting point for other software projects (I have some in mind related to my own field of Control Engineering analysis), and to have this running on Windows as well as linux helps enormously. I look forward to testing it soon!

Yes, we want MonoDevelop to become a "crossplatform platform" for C# IDEs!

I've already been waiting like 3 years already :)

I'd be interested to hear from you and Hywel on how well the MD platform in its current state fits your needs, and what we could do to improve it.

Me Too!

We have already been waiting for too long.

I am a bit sad that even the newest version of monodevelop does not run out of the box on windows and mac (i know that the mac version is now included as a precompiled version with the mono download package, but just try to download the sources of the newest version of MonoDevelop and try to compile it on the mac on your own.).

Having an Eclipse-like IDE for mono which does run cross plattform on all the major operating systems is really needed to give mono it's independency from .NET and Visual Studio and the ability to develop cross platform solutions on multiple platforms in parallel. For this reason a lot of university courses choose Eclipse and Java and so do a lot of companies.

I have never understood why a lot of the great mono programs out there were developed in such a platform-dependent way and are now being ported with a lot of effort to other plattforms. That does not do justice to mono's capabilities for cross-platform development at all and is bad for it's reputation for open source development. For a lot of programs there is no way to develop them completely cross-plattform, because there are always the last ten percent where you have to deal with the underlying operating system (something Sun had to learn the hard way with Java (JNI)) but when you provide for it at before you start to develop something things are easier.

That said i don't wan't to be unfair to the MonoDevelop team. They have done a great job. MonoDevelop is a great IDE on Linux for C# / Boo programming (and my favourite one) and i really love all of its Visual-Studio-like functionality and that it's gets better and better with each version. The integration of the mdb and gdb debuggers is fantastic. But i am really sad that i don't have one ide for all plattforms yet (and i have to do development on all three major plattforms which is really annoying when you have to deal with it).

So congratulations and please keep porting on.

Cool thing, i hope monodevelop will be available on windows soon.

I am a ASP.Net developer, who has to work with an SVN-repository for most projects.
AnkhSVN for Visual studio is dog slow and Shardpdevelop has no ASP.net support...
So monodevelop which has both advantages (native SVN and ASP.Net) would be a very nice improvement...
It also would allow me to work from home (using debian linux) with exactly the same tools as i use at work.

greetings,
me

I tried the process you mentioned but I got the following error even though I have gtk-sharp 2.12 installed:

Could not load file or assembly 'gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.

Any idea?

Using Mono, I got the following error message:

System.TypeInitializationException: An exception was thrown by the type initializer for MonoDevelop.Core.Gui.Services ---> System.InvalidOperationException: Extension node not found in path: /MonoDevelop/Core/PlatformService

at Mono.Addins.ExtensionContext.GetExtensionObjects (System.String path, System.Type arrayElementType, Boolean reuseCachedInstance) [0x00000]

at Mono.Addins.ExtensionContext.GetExtensionObjects (System.String path) [0x00000]

at Mono.Addins.AddinManager.GetExtensionObjects (System.String path) [0x00000]

at MonoDevelop.Core.Gui.Services..cctor () [0x00000]

--- End of inner exception stack trace ---

at MonoDevelop.Ide.Gui.IdeApp.Initialize (IProgressMonitor monitor) [0x00000]

at MonoDevelop.Ide.Gui.IdeStartup.Run (System.String[] args) [0x00000]

While I got this when I use .NET framework 3.5 SP1,

WARNING [2009-04-02 23:30:14Z]: MonoDevelop failed to start. Rebuilding addins registry. Unhandled Exception: System.InvalidOperationException: Add-in manager not initialized.
at Mono.Addins.AddinManager.CheckInitialized()
at Mono.Addins.AddinManager.get_Registry()
at MonoDevelop.Startup.SharpDevelopMain.Main(String[] args)

So the OpenSUSE binaries ran on a windows machine? That's because things aren't compiled to native, right? So you just had to have Mono and GTK#, basically, and you could run the "binaries" compiled for a different platform? That's wonderful.

I'm testing 2.2 beta 1 on windows. I have Windows 7 64 bits but when I try to run it the GTK# app crashes. I believe it is because it is trying to run as a 64 bit app and the gtk libraries are 32 bits. How should I solve this? I know that in .NET you change the platform to x86 and that solves the problem but on monodevelop I can't find where to change that.

Great work!!! Thanks!!

David, in liue of a more elegant solution, you can solve this problem in the same way that the blog post got Monodevelop to run, by using corflags.exe to set your binary to 32-bit. At least, it has worked for me for a minimal window-only GTK# app.

If you're running MD on Windows, you're likely using .NET (you can switch target runtimes in MD preferences). This mean you can add the CSC argument "/platform:x86" to the "additional compiler arguments" field in the project options.