Recently I step upon an issue of compiling a project using Mono. Mono itself comes with nice tool called xbuild which is a msbuild brother in Mono world. Xbuild can be used to compile a project from command line.
I wanted to compile my project targeting Mono under Visual Studio 2012. Unfortunately, targeting for Mono (profile=Mono) does not exists in Visual Studio. Following instructions will add new profile and then new target – Mono – will be available.
- Download and install Mono from this location.
- Create Mono directory in somewhere on your drive. We will later copy it to
Program Files
. - Copy content from
C:Program Files (x86)Mono-3.2.3libmono4.5
to Mono directory. - Inside Mono directory create new directory called
RedistList
-
In RedistList folder create file called
FrameworkList.xml
with following content:<?xml version="1.0" encoding="utf-8"?>
<FileList Redist="Mono_3.2.3" Name="Mono 3.2.3 Profile" RuntimeVersion="4.5" ToolsVersion="4.5"></FileList> -
Go to
C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.5
and create there a folder calledProfile
-
Copy folder
Mono
(the one you created in step2
) into Profile folder. -
Add following key in your registry:
HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETFrameworkv4.0.30319SKUs.NETFramework,Version=v4.5,Profile=Mono
(note that this is just a key, no values inside)
Now when you start your Visual Studio 2012 you should be able to select target called Mono 3.2.3 Profile
Pingback: dotnetomaniak.pl
Thanks for the input! 🙂