VSIX package to allow VS2010 to load MonoTouch and MonoMac projects
Switch branches/tags
Nothing to show
Latest commit 3c69c92 Dec 6, 2011 @jamiebriant jamiebriant updated docs




UPDATE: Until December 5th, the ready-built VSIX file was out of date (version 1.7). Its now the correct version (5.0) so you don't have to compile. Thanks to @slodge for discovering that.

Just double click on the vsix file. It will install into Visual Studio 2010 automatically. If you want to open the solution to see the truly amazing code I wrote then you can do that too.

Ok, download the vsix file first, then double click on it.


MonoTouch projects load once the VSIX is installed, however MonoMac files currently have the following line:

<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />

I first recommended deleting this line, but of course it keeps coming back. So you'll now find a dummy Mono.MonoMac.targets in the repo that needs to be copied to here:

C:\Program Files (x86)\MSBuild\Mono\MonoMac\v0.0


MonoTouch should "just work". Once you've loaded the project, you'll probably be wondering how to get intellisense to work, given that monotouch.dll isnt available. I've got a tool that can convert a .NET dll into "dumb" source code but its total overkill. Just use ildasm/ilasm as described below. Details on how to set up PC/Mac MT development are on my blog.

Loading monotouch.dll in VS

You'll be able to load the projects in Visual Studio, but Resharper will complain. The monotouch.dll references System assemblies that dont exist on windows. There is a relatively easy fix for this: patch the dll using ildasm/ilasm.

ildasm /all monotouch.dll /out=monotouch.il

Then locate the "assembly extern" definitions, like this one:

.assembly extern /*23000001*/ mscorlib
  .publickeytoken = (7C EC 85 D7 BE A7 79 8E )                         // |.....y.
  .ver 2:0:5:0

And convert them to this:

.assembly extern /*23000001*/ mscorlib
  .publickeytoken = ( b7 7a 5c 56 19 34 e0 89  )                         // |.....y.
  .ver 4:0:0:0

And run ilasm to regenerate monotouch.dll

ilasm monotouch.il /output=monotouch.dll

Finally, in Visual Studio, update the project's Reference Paths (a tab of the project properties) to point to the directory with the new monotouch.dll. Doing so will only affect where Visual Studio looks, and not where MonoDevelop on OSX looks.