Let Me Explain: Install XNA on Visual Studio 2013 and 2012

Standard

XNA

Although XNA is dead, it’s still a great framework if you wish to develop to Windows, Windows Phone 7.5 and Xbox 360, even if you start using MonoGame, you will still need XNA for those platforms. As XNA doesn’t support any Visual Studio (VS) above 2010, you’ll need to do some manual steps to install it in VS 2012 and 2013. Fortunately, VS2013 didn’t change much in regards to application architecture, therefore, the same steps to install it in VS2012 apply to 2013.

That being said, this is the steps I always follow:

  • (For Windows 8 users) Install Games for Windows Live client. You just need to install it, no further input is required.
  • Install Visual Studio 2013 or 2012
    • This will install VS 2010 Express for Windows Phone and, with it, XNA
      • If by some reason the XNA installation fails, reinstall
    • Alternatively, you can install any Visual Studio 2010 and XNA standalone
  • Copy XNA from VS2010 to VS2013
    • 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 VS2013 “C:\Program Files (x86)\Microsoft Visual Studio 12.0\common7\ide\extensions\Microsoft”
      • For VS2012 “C:\Program Files (x86)\Microsoft Visual Studio 11.0\common7\ide\extensions\Microsoft”
  • Open the extension.vsixmanifest file with your favourite text editor (with Administrator privileges), inside the copied XNA Game Studio 4.0 folder
  • Change the supported Visual Studio version
    • Change this: <VisualStudio Version=”10.0″> to
      • For VS2013: <VisualStudio Version=”12.0″>
      • For VS2012: <VisualStudio Version=”11.0″>
  • Tell VS to rebuild the Extensions cache
    • Run this command (Win+R):
      • For VS2013 “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /setup
      • For VS2012 “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe” /setup
    • If you get an error doing this, run it in a Command Prompt with Administrator privileges
    • This isn’t always necessary, specially if you have just installed Visual Studio

That’s it, now start creating great games ! Btw, do you know what XNA acronym stands for?

 

Advertisements

58 thoughts on “Let Me Explain: Install XNA on Visual Studio 2013 and 2012

    • I haven’t tested it but, I’m positive that it will and that you don’t need the first step because it’s already installed by default AFAIK.

      That being said, go ahead and try it, I would be glad to hear back from you with feedback!

      • Soandsoso

        I did everything right now, but seems like it doesnt work.
        Not sure whether something went wrong or its just a different process.

        Thanks and great Tutorial, though!

      • It’s not a different process so, lets debug it.

        – What you trying with VS2013 or 2012?

        – You say it doesn’t work based on what? Any error or you can’t find the XNA project templates ?

        – If you choose any VS default setting other than C#, are you sure you are looking for the projects in the correct place? (If this is the case, in the New Project window, go to Templates>Other Languages>Visual C#, “XNA Game Studio” should be there.

        – Did you rebuild the extensions cache?

        – Confirm that the extension.vsixmanifest of the VS11/12 (and not the original from VS10) has the right version change

    • Sorry for posting in a reply, I don’t see any “comment” box!

      I’m on windows 7 and it’s not working for me. I followed the tutorial, Now when I create a new project, the tab “XNA Game Studio 4.0 appears with all the templates, but when I click ok, I get an error pops and says this:
      “A problem occurred during the creation of the sub-project. ‘MyProject. Error: this template attempted to load an assembly component “Microsoft.Xna.GameStudio, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 6dc3888ef60e27d”
      (I translated this from french, it might not be the exact message you would get on the english version)

      Do you have an idea on how to solve this problem? Thanks

  1. Soandsoso

    It works, finally!
    I checked the single steps again and i think i didn’t rebuild the extensions cache correctly.
    Thanks for your effort and for the tutorial!

      • Marc te Vruchte

        I also had an issue with the extension cache not updating correctly for VS2013 with Windows 7. When I cleared the extension cache by hand, and updated the cache again things worked perfectly 🙂

        You can clear the extension cache by removing the files from the folder: %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\Extensions

      • The last step, rebuilding the extensions cache, should have had dealt with that. That being said, I’m glad it worked out for you.

        Have a great 2014!

        Cheers,

        – A

  2. Milos

    Nice, but now.. how to I debug the project using Emulator / Device? When I did this on my VS 2013 and Win8, my WP8 XNA Game Studio project loaded well but I cannot run it / debug it using emulator. It says the “library” project cannot be debugged. Got any tips how to fix this too?

    • As I’ve said in another reply, you’ll need to install VS2010 to use VS2010 precompiled Bullet binaries. The alternative is to build Bullet yourself with your version of Visual Studio.

      I’ll update this in the original post ASAP.

  3. gamelord327

    Ok, i did everything you said and when i get to the last step, the rebuild extension one, it gives me this error. This happened when i did both run and Command Prompt. I then thought that maybe because i installed Visual Studio Express for Desktop 2013 only a few days ago maybe i don’t even need to worry about that, so when i went into Visual Studio, i went to create a new project and there were no templates for XNA.

      • John29

        Hi,
        I also try with run and it says can’t find file then I try with command prompt with privileges and says the name of the file o the directory if wrong.

  4. mr.D

    Hello, gentlemens
    I’ve got a problem on this step
    “Tell VS to rebuild the Extensions cache
    Run this command (Win+R):
    For VS2013 “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /setup
    For VS2012 “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe” /setup

    My configuration: Win 8.1(x64)
    I was try installing Windows Phone SDK 7.1, but i cant, cuz I’ve got Win 8.1. I was install Windows Phone SDK 8. In this pack VS2010 is absent, but VS2012 is here. I think it’s possible.

    After VS2013 installation i cant find “devenv.exe”. And folder “Extensions” is absent in this way “%LOCALAPPDATA%\Microsoft\VisualStudio\12.0\Extensions”. I cant clear cache by hand..

    • Hi,

      Why coudln’t you install Windows Phone 7.1? There are some problems regarding WP7 in VS2013, as I’ve configurated my machine some month ago I don’t remember the problems I had but, I just confirmed that I have XNA and WP7.1 development (with emulator) working in VS2013 Ultimate.

      Regarding your problem:
      1. You’ll need the Windows Phone SDK 7.1 installation (that comes with VS2010 and XNA), WP8SDK doesn’t have it.
      2. If you have installed VS2013 in a 64bit OS and you can’t find devenv.exe, i’m pretty much positive it is because you’re looking in C:\Program Files\Microsoft Visual Studio 12.0\[…] and not in C:\Program Files (x86)\Microsoft Visual Studio 12.0\[…] (the different being that, Visual Studio 2013 and bellow are 32 bits programs, hence, reside in the x86 program files folder). The extensions folder is not created with the installation, It might be created in the first run or the first time you install an Extension.

  5. SloanThesloth

    Does this work with VS 2013 Express? I got through must of it, but then the last step, where you tell VS to rebuild the extension cache, I can’t find that exe file. I tried searching for it and copying and pasting it, but it’s not actually there.

    • hey my bad. xna can not be used to develop things specifically for win 8 but when developing for 7.1, it will cover the win8 platform too.

      thanks for your help this is very important tutorial.

      • it worked!! ty soooooooooooooooooooooo much, ur a genius!! =D
        for your last step i had to do it manually in cmd prompt. it hadn’t given me any errors with the run command but xna wasn’t there first. then i tried on cmd n it worked finally i can start off!
        thank you once more!! =D

    • This blogpost doesn’t cover anything related to platform support.

      That being said, Windows Phone 8 has legacy support for WP7 apps and XNA is used to develop WP7 games, thus, a game developed with XNA will run in WP7 and WP8.

  6. Eduardo

    Hello, I’m trying to deploy some .ccgames to Xbox 360 and I always get the same error:
    The game you’re trying to play is missing or corrupt. Please delete and redownload the game do you wnat to restart xna game studio connect.
    Do you know hot to fix it?

  7. Ryan

    can you elaborate on this step?

    Run this command (Win+R):
    For VS2013 “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /setup
    For VS2012 “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe” /setup

    Is this the same thing as navigating to that directory and launching devenv.exe? If not then what exactly do I type into run? Do I include “/setup”? Do I include the quotes?

    • Use Run and copy everything from the first quote to the ending p of /setup. The quotes are only required because the path has spaces (before (x86)), and you need to use Run because it’s the easiest way to start a program with arguments (being the argument the /setup, it will tell Visual Studio to run some configuration code before opening the editor).

      Was it clear enough ? Hope it helps!

  8. Faulk

    So I’m new to XNA. Someone is hooking me up with their XNA account, I just need to get everything going. I’m on Windows 8, and when I download Visual Studio 13, it’s stuck on initializing. I left it to download over night and it was stuck on “Creating a restore point”, and never progressed anywhere.

    I’ve downloaded XNA Game Studio Connect on my 360, but I’m just lost as to what to do no the PC side of things. I don’t own a Windows Phone, so none of that applies to me.

    Sorry for requesting help here, as this is the point of your whole post, I’m just new and well, lost.

    Any help would be appreciated.

    (btw, I don’t plan on making games. I’ll just be downloading new builds of games, and will help debug. For the game “ApocZ” primarily.

  9. Lupe

    Hello,

    Thank you for the guide. I was having one heck of a time getting it to work though. I have VS 2013 express. I found a work around for the rest of the people like me (maybe you can add on to your guide for express users)

    – copy “XNA Game Studio 4.0” to “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpressExtensions\Microsoft\XNA Game Studio 4.0”

    – Add this line into extension.vsixmanifest: WDExpress (you should be able to see where it makes sense)

    – replace devenv.exe with WDExpress.exe

    Also, to reset the extensions manually replace “%LocalAppData%\Microsoft\VisualStudio\12.0\Extensions” with “%LocalAppData%\Microsoft\WDExpress\12.0\Extensions”

    • EpicSauceBro

      I’m sorry but I didn’t quite understand where to put “WDExpress” in the exension.vsixmanifest, also where do I replace de devenv.exe with WDExpress.exe ?

  10. dark

    Hi, I did everything but I keep having this error “No target is available for deploying.” whenever I try to debug.

    This problem only seems to happen whenever I try to create a Windows Phone Game project.

    Just to clarify, when running the “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe” /setup, is something supposed to happen after that? Cause whenever I run it as administrator, my computer loads for a few seconds and nothing seems to happen after that.

  11. Worked on Windows 7. Had to do the extension rebuild bit a couple of times, but it did indeed work. I think I may have had vs2013 open the first time I tried… not sure.

  12. Boomer

    I know this is about 6 months old, but I hope someone still checks this. I can’t seem to find devenv.exe. I’ve checked both the 2013 and 2010 versions of VS. I’ve double checked (as per an earlier comment) to make sure that I’m using Program Files (x86) instead of just Program Files. No idea why I can’t solve this last step and Google has resulted in no answers. Please assist.

  13. EpicSauceBro

    Hey, thanks for the tutorial!

    I got stuck on the rebuilding the extension cache step. For me “devenv.exe” does not exist. Would appreciate your help, thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s