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:
- Download the profile itself from here.
- Unzip the contents of the profile Zip to one of the following directories:
- 32-bit systems: C:Program FilesReference AssembliesMicrosoftFramework.NETFrameworkv4.0Profile
- 64-bit systems: C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.0Profile
- The "Mono" folder in the ZIP should be directly under the "Profile" directory.
- Restart Visual Studio if it had been running, open the properties of the project you want to use with Mono, and select the Mono Profile for 2.8:
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.
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\_MACHINESOFTWAREWow6432NodeMicrosoft .NETFrameworkv4.0.30319SKUs .NETFramework,Version=v4.0,Profile=Mono I suppose for x86 it’s HKEY\_LOCAL\_MACHINESOFTWAREMicrosoft.NETFramework v4.0.30319SKUs.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.