Using XNA with Visual Studio 2012 RTM
12 settembre 2014
XNA Game Studio 4.0 officially supports only Visual Studio 2010, but the extension can be made to work on Visual Studio 2012 as well.
Procedure
- First of all you need Visual Studio 2010 SP1 installed.
- Install XNA Game Studio 4.0. The easiest way is to install the Windows Phone SDK 7.1, which contains everything required.
- Copy the XNA Game Studio extension from VS 2010 to VS 2012 (paths may vary if not on an x64 computer with default paths):
xcopy /e "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0" "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0" - Open the file
extension.vsixmanifestin the destination directory. - Upgrade the supported product version to match the new version (11.0) for each of the listed editions: VSTS, VSTD, Pro, VCSExpress, VPDExpress.
- You may have to run the following command to tell Visual Studio that new extensions are available:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup
This has been tested for Windows games. Neither Xbox nor Windows Phone 7 games have been tested.
Update: other useful steps
If the procedure above is not enough, install the Games for Windows Live client from Xbox.com, or follow this manual procedure:
- Download the XNA Game Studio 4.0 zip file and unzip it somewhere. You should see an executable called
XNAGS40_setup.exeand a folder calledXNA Game Studio 4.0. - Open a command line, navigate to the folder that contains
XNAGS40_setup.exeand runXNAGS40_setup.exe /x. You’ll be asked to enter a folder: create a new empty one. This folder is temporary and can be deleted when you are done. - Go to the temporary folder and run
redists.msi. - Run the following MSI packages, in order:
%ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Setup\XLiveRedist.msi %ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Redist\XNA FX Redist\xnafx40_redist.msi %ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnaliveproxy.msi %ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_platform_tools.msi %ProgramFiles%\Microsoft XNA\XNA Game Studio\v4.0\Setup\xnags_shared.msi - Copy the folder
XNA Game Studio 4.0provided in the zip file toC:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft. - Go back to the temporary folder and run the MSI named
arpentry.msi. - Open a command prompt and run:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup - Delete the temporary folder, the zip file and the folder you extracted it to: you don’t need them any more.