Possible workarounds for project type is not supported by this installation error in XNA Game Studio

Note - my colleague Yuichi Ito has provided a Japanese version of the information in this blog post. You can find it at this location on his blog .  

Every so often, I hear from a user who has encountered an error like the following while trying to open an XNA Game Studio project in Visual Studio:

The project type is not supported by this installation.

There are a couple of common causes that I’ve seen for this type of error, so I wanted to describe each of them here in case they help anyone who encounters this type of error in the future.

Issue 1: The project file is from a version of XNA Game Studio not installed on the system

If you have an XNA Game Studio project created with a different version than you have installed on your system (for example, if you download a sample from the Creators Club site or something like that), then you might encounter this error.

There are automatic upgrade paths for some versions of XNA Game Studio, but not for all of them.  An XNA Game Studio Express 1.0 or 1.0 Refresh game can be opened with XNA Game Studio 2.0.  An XNA Game Studio 2.0 project can be opened with XNA Game Studio 3.0 or 3.1.  An XNA Game Studio 3.0 project can be opened with XNA Game Studio 3.1.  An XNA Game Studio 3.0 or 3.1 project can be opened with XNA Game Studio 4.0.  Other combinations may lead to this error message.

For example, you cannot open a project created with XNA Game Studio 3.0 on a system that only has XNA Game Studio 2.0 installed or has Visual Studio 2008 but does not have XNA Game Studio 3.0 installed.

If this is the issue causing the error on your system, you will need to make sure that you have the version of XNA Game Studio installed that the project was created with, or you can create a new project using the version of XNA Game Studio that you have installed and then import the code and content from the original project as a workaround.

Issue 2: The XNA Game Studio package is not loading properly

In some cases, XNA Game Studio is installed, but there is some kind of problem that causes it to fail to load correctly in Visual Studio.  I have seen this happen in the past (for example, in this forum post) when a user encountered a package load failure dialog like the following, and then clicked on the Yes button.  Doing this will prevent Visual Studio from loading the XNA Game Studio package in the future (which is why I personally always make sure to click No if I ever encounter a package load failure dialog within Visual Studio):

If this is the cause of the error message on your system, you can run one of the following command lines from an elevated cmd prompt to reset Visual Studio so that it will not automatically skip loading the XNA Game Studio package the next time you run Visual Studio.

For XNA Game Studio Express 1.0 and XNA Game Studio 2.0:

  • For Visual Studio 2005 Standard Edition and higher:   "%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /ResetSkipPkgs
  • For Visual C# 2005 Express Edition:   "%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\vcsexpress.exe" /ResetSkipPkgs

For XNA Game Studio 3.0 and 3.1:

  • For Visual Studio 2008 Standard Edition and higher:   "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /ResetSkipPkgs
  • For Visual C# 2008 Express Edition:   "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\vcsexpress.exe" /ResetSkipPkgs

For XNA Game Studio 4.0:

  • For Visual Studio 2010 Professional Edition and higher:   "%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /ResetSkipPkgs
  • For Visual C# 2010 Express Edition:   "%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\vcsexpress.exe" /ResetSkipPkgs
  • For Visual Studio 2010 Express Edition for Windows Phone:   "%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\vpdexpress.exe" /ResetSkipPkgs

Note – the above command lines assume that you have installed Visual Studio to the default location and that you are using a 32-bit version of Windows.  You may need to modify the command lines depending on where Visual Studio is installed on your system.  You should use %ProgramFiles(x86)% instead of %ProgramFiles% if you are using a 64-bit version of Windows.

<update date="11/16/2009"> Added a link to a Japanese version of the information in this blog post. Thanks Ito! <update>

<update date="1/29/2011"> Added information about Visual Studio 2010 and XNA Game Studio 4.0. </update>