Migrating MonoGame Projects to VS2013 and Windows 8.1

Support for XNA ended with Windows 7 and Visual Studio 2010. Since a lot of MonoGame projects still depend on the XNA content projects to drive the content pipeline, a functional XNA Game Studio environment is still needed. This makes migrating to later versions of Windows or Visual Studio a pain. Here’s my notes on the process. Nothing I’m presenting here is new information; I’m simply collecting it into a single place for convenience.

You’ll need to migrate to Windows 8 or later to take advantage of Windows Phone 8 development. Likewise you’ll need to adopt Visual Studio 2012 or later to integrate with the Windows Phone SDK.

Installing XNA Game Studio

If you try to install the latest copy of XNA Game Studio on a fresh system, you’ll be greeted with a compatibility warning from the installer. The installer will also fail.

This StackOverflow Answer provides an explanation and solution to the problem. The problem is an incompatibility with the Games for Windows – LIVE Redistributable that XNA Game Studio tries to install and Windows 8. The solution is to install the latest Games for Windows Marketplace Client, which is compatible with Windows 8 and will satisfy the XNA Game Studio dependency.

Integrating XNA with Visual Studio 2013

StackOverflow provides another great answer to this problem as well.

  • Copy the XNA Game Studio 4.0 directory from C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft.
  • In the newly copied directory, open the file extension.vsixmanifest in a text editor like notepad. Make sure you run the editor with administrator rights.
  • Update the VisualStudio Version under the SupportedProducts group from 10.0 to 12.0, like so:
  • You’ll need to let Visual Studio know to look for new extensions. Run the following command from cmd or powershell: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" /setup. Again, make sure you started cmd or powershell with administrator rights.
  • If you’ve installed other XNA templates from Visual Studio Gallery that you’d like to use, see XNA Templates for Visual Studio 2013.

Integrating MonoGame with Visual Studio 2013

MonoGame has no issues with VS2013 per se. The problem is that the public MonoGame download (at time of writing) is still 3.0.1. This predates VS2013, so project templates aren’t installed. For opening existing projects, this step isn’t necessary.

MonoGame stores project templates in C:\Users\<user>\Documents\Visual Studio 20xx\Templates\ProjectTemplates\Visual C#\MonoGame. Each project template is a standard zip file with a bunch of project files and a .vstemplate template file.

  • If you have VS2010 installed on your system, then you can copy the MonoGame templates from the 2010 directory into the 2013 directory.
  • If you have VS2012 installed, you can copy the MonoGame templates from the 2012 directory into the 2013 directory, but with one major caveat:
    • You will need to go into each of the 2012 templates and edit the __Game.vstemplate or __XamlGame.vstemplate file. There’s an directive near the bottom of these config files that references Version=11.0.0.0 of the Microsoft.VisualStudio.SmartDevice.ProjectSystem.Base assembly. The version number must be advanced to 12.0.0.0 in order to function on a system without 2012 installed.
  • If you’re missing the 2010 or 2012 templates, you can get them from the MonoGame source control. Zip the contents of each of the template folders into a zip file of the same name, and then copy them into your 2013 Templates\ProjectTemplates\Visual C#\MonoGame directory. The above caveat for editing the 2012 templates still applies.

About jaquadro

I am a full time software developer and part time game and game tooling developer.
This entry was posted in Tutorials and tagged , , , , . Bookmark the permalink.

One Response to Migrating MonoGame Projects to VS2013 and Windows 8.1

  1. Alessandro says:

    Do you know where to find the pipeline tool of Monogame? They say it is in the sdk but I don’t find it.

    Bye,
    ADG

Leave a Reply

Your email address will not be published. Required fields are marked *