In Software Development on October 23, 2010 by Greg Hurlman Tagged: Mono 2.8, MonoDevelop, Visual Studio 2010
New update, addressing error popups, at the end.
In case you missed it or normally just don’t care, the Mono Project recently released Mono 2.8 – essentially, Mono for .Net 4.0. One of the first things I went looking for after installing Mono 2.8 today was integration with Visual Studio 2010.
I quickly found the Mono Tools, but didn’t feel like paying for something that is doing more than I need right now – I’m not pushing to Linux any time soon; I’m looking for easy code migration to MonoDevelop & OSX/iOS. Next, I found a post from Jonathan Pobst that looked promising, but it was talking about older versions of Visual Studio and Mono 2.4/.Net 3.5. Close, but not quite.
So, I basically cribbed off Jonathan’s notes to put together a profile for 2.8/4.0 that thus far seems to be working well.
You can integrate the new Mono 2.8 profile with 3 simple steps:
Note: You will not be able to select the Mono Profile straight from the New Project dialog box; for some reason, that list of profiles doesn’t match. Create your project as a .Net Framework 4.0 project first, and after creation set the project properties to Mono.
If you’ve upgraded your MonoDevelop install to the latest version (as of today, anyway), this Visual Studio solution & Project file will open with no problem – no changes required at all.
So what does this buy you? Proper reference alignment within Visual Studio, Intellisense that works against the Mono version of the Framework, and, as I said, easy code and project sharing with MonoDevelop across OSX and (I would assume, I haven’t tried) Linux installs.
Enjoy, and if you find any incongruities or things that are just plain wrong, definitely let me know.
Update!
I had the same problem, the error dialog telling me I should download “.NETFramework,Version=v4.0,Profile=Mono” in order to run my application.
The trick was to create registry key. For me, running Windows 7 x64, it was:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
.NETFramework\v4.0.30319\SKUs\
.NETFramework,Version=v4.0,Profile=MonoI suppose for x86 it’s
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\
v4.0.30319\SKUs\.NETFramework,Version=v4.0,Profile=Mono(Where v4.0.30319 would be the version of the current 4.0 framework installed.)
Hope that helps!
– Markus Mayer, in the comments
I’m sure that’ll help a ton of people Markus – thanks for tracking that down!
Mental note… remember to document stuff like this that I do so I still have it when I build a new system.Trackback: