Click or drag to resize
DigitalRuneUsing XNA Game Studio with Visual Studio 2012 (or higher)

Microsoft XNA Game Studio only supports Visual Studio 2010. Later version of Visual Studio are only partially supported (only Windows Phone 7 projects). Here is a list of workarounds to use the Microsoft XNA Game Studio with Visual Studio 2012 and higher.

This topic contains the following sections:

Setup

Follow these instructions to use XNA Game Studio with Visual Studio 2012 (or higher).

  1. For Windows 8 users: Install Games for Windows Live client.
  2. Install Visual Studio 2012 or higher.
  3. Install Windows Phone SDK 7.1 and Window Phone SDK 7.1.1 Update. (Note: The Windows Phone SDK contains XNA Game Studio.)
  4. Copy the folder named XNA Game Studio 4.0 from

    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\common7\ide\extensions\Microsoft

    to

    • (for VS2012) C:\Program Files (x86)\Microsoft Visual Studio 11.0\common7\ide\extensions\Microsoft
    • (for VS2013) C:\Program Files (x86)\Microsoft Visual Studio 12.0\common7\ide\extensions\Microsoft
    • (for VS2015) C:\Program Files (x86)\Microsoft Visual Studio 14.0\common7\ide\extensions\Microsoft

    On some systems Visual Studio is incorrectly installed in the Program Files (x86) folder instead of the Microsoft Visual Studio 12.0 folder. In this case you have to use this target path: C:\Program Files (x86)\Common7\IDE\Extensions\Microsoft

    • C:\Program Files (x86)\Common7\IDE\Extensions\Microsoft
  5. Start a text editor with administrator privileges. Open the file extension.vsixmanifest from the folder XNA Game Studio 4.0. and change the supported Visual Studio version from
    • <VisualStudio Version="10.0">

    to

    • (for VS2012) <VisualStudio Version="11.0">
    • (for VS2013) <VisualStudio Version="12.0">
    • (for VS2015) <VisualStudio Version="14.0">

    This works for Visual Studio Professional. If you use an edition that is not listed, you might have to add a tag for this edition. For example, for Visual Studio 2013 Premium or Ultimate change

    <SupportedProducts>
      <VisualStudio Version="10.0">
        <Edition>VSTS</Edition>
        <Edition>VSTD</Edition>
        <Edition>Pro</Edition>
        <Edition>VCSExpress</Edition>
        <Edition>VPDExpress</Edition>
      </VisualStudio>
    </SupportedProducts>

    to

    <SupportedProducts>
      <VisualStudio Version="12.0">
        <Edition>Ultimate</Edition>
        <Edition>Premium</Edition>
        <Edition>Pro</Edition>
      </VisualStudio>
    </SupportedProducts>
  6. On some PCs the following step is necessary: Clear the VS extension cache. For example, for Visual Studio 2013 delete the files in
    • %localappdata%\Microsoft\VisualStudio\12.0\Extensions
  7. Open the command prompt with administrator privileges. Change the working directory to the directory which contains devenv.exe:
    • (for VS2012) C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\
    • (for VS2013) C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\
    • (for VS2015) C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\

    or

    • C:\Program Files (x86)\Common7\IDE\

    and execute

    devenv.exe /setup

    to rebuild the extension cache.

Known issues

Content is always rebuilt

In some solutions XNA content projects are always rebuilt even if the output is up-to-date - which can be annoying because building content can take many minutes in larger projects. Usually, this happens if a content pipeline project is included in the solution. The content pipeline assembly is updated every time the project is built, which causes the content to be rebuilt.

A simple workaround is to build the content pipeline projects once and then unload it from the Visual Studio solution: In Visual Studio open the Solution Explorer, right-click the content pipeline project and select Unload Project in the context menu.

If this does not solve the problem and the content is still rebuilding, then you can check the Visual Studio build log in the Output window to see which project causes the rebuilds. You might have to increase the amount of information in the build log: Open the menu Tools | Options... | Projects and Solutions | Build and Run and change the MSBuild project build output verbosity to Detailed.

See Also