Torna al Blog

    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

    1. First of all you need Visual Studio 2010 SP1 installed.
    2. Install XNA Game Studio 4.0. The easiest way is to install the Windows Phone SDK 7.1, which contains everything required.
    3. 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"
    4. Open the file extension.vsixmanifest in the destination directory.
    5. Upgrade the supported product version to match the new version (11.0) for each of the listed editions: VSTS, VSTD, Pro, VCSExpress, VPDExpress.
    6. 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:

    1. Download the XNA Game Studio 4.0 zip file and unzip it somewhere. You should see an executable called XNAGS40_setup.exe and a folder called XNA Game Studio 4.0.
    2. Open a command line, navigate to the folder that contains XNAGS40_setup.exe and run XNAGS40_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.
    3. Go to the temporary folder and run redists.msi.
    4. 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
    5. Copy the folder XNA Game Studio 4.0 provided in the zip file to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft.
    6. Go back to the temporary folder and run the MSI named arpentry.msi.
    7. Open a command prompt and run:
      "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup
    8. Delete the temporary folder, the zip file and the folder you extracted it to: you don’t need them any more.