How to install XNA game studio on Visual Studio 2012?
Asked Answered
O

4

196

Is it possible to create XNA games using Visual Studio 2012?

Orphrey answered 4/6, 2012 at 12:7 Comment(4)
Yes it's check this website for more information http://www.c-sharpcorner.com/UploadFile/iersoy/developing-xna-apps-in-visual-studio-2012without-xna-gs/Sussi
@pho3nix: you should add an answer with the summary of the described process, as it may be a valid workaround.Orphrey
@Christopher Horenstein: did you test on VS 2013?Orphrey
@SteveB Yes, I have it running on VS 2013 and Windows 8.1. Didn't run into any issues, just had to change the version numbers as mentioned in the answer.Charente
K
65

On codeplex was released new XNA Extension for Visual Studio 2012/2013. You can download it from: https://msxna.codeplex.com/releases

Kassa answered 23/1, 2014 at 18:37 Comment(7)
You posted this just as I was sitting here trying to get Windows 8.1/VS2012 to play nicely with XNA. What can I say, it works. Well done and thanks.Darky
This is incontestably the correct answer. Thanks. And thanks to the product team to at least upgrade this framework for the latest developer tools.Orphrey
Is this created through legal means?Shovelnose
Amazing. Lazy as i was by still having a copy of 2010 for when i want to fiddle with XNA. This installed it easy and with lightning speed for Win7/VS2012. Now i can nuke my copy and fiddle some with an old project of mine. Thanks a lot!Ornithology
@MsXNA, Nice work, btw just wondering... What's the legality of this?Arin
Its legal. I mean, its hosted on codeplex, owned by microsoft. It doesn't contain any microsoft code, or very much code at all for that matter. Its just a set of msi installers, that they didn't even create, just redistributing, and a vsix visual studio extension, which ofc creating extensions for visual studio is perfectly legal.Chippy
@Justin Skiles Totally legit. Linked on the MSDN page for the XNA 4.0 Refresh (in the community additions section).Graveclothes
O
193

Yes, it's possible with a bit of tweak. Unfortunately, you still have to have VS 2010 installed.

  1. First, install XNA Game Studio 4.0. The easiest way is to install the Windows Phone SDK 7.1 which contains everything required.

  2. Copy the XNA Game Extension from VS 10 to VS 11 by opening a command prompt 'as administrator' and executing the following (may vary if not x64 computer with defaults 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"

  3. Run notepad as administrator then open extension.vsixmanifest in the destination directory just created.

  4. Upgrade the Supported product version to match the new version (or duplicate the whole VisualStudio element and change the Version attribute, as @brainslugs83 said in comments):

    <SupportedProducts>
      <VisualStudio Version="11.0">
        <Edition>VSTS</Edition>
        <Edition>VSTD</Edition>
        <Edition>Pro</Edition>
        <Edition>VCSExpress</Edition>
        <Edition>VPDExpress</Edition>
      </VisualStudio>
    </SupportedProducts>
    
  5. Don't forget to clear/delete your cache in %localappdata%\Microsoft\VisualStudio\12.0\Extensions.

  6. You may have to run the command to tells Visual Studio that new extensions are available. If you see an 'access denied' message, try launching the console as an administrator.

    "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /setup
    

This has been tested for Windows Games, but not WP7 or Xbox games.

[Edit] According Jowsty, this works also for XBox 360 Games.

[Edit for Visual Studio 2013 & Windows 8.1] See here for documentation on installing Windows Phone SDK 7.1 on Windows 8.1. Use VS version number 12.0 in place of 11.0 for all of these steps, and they will still work correctly.

Orphrey answered 4/6, 2012 at 12:7 Comment(22)
This isn't working for me. I have VS2010 Ultimate on Win7 x64, where I can create and manipulate XNA 4 projects. I installed the VS2012 Ultimate RC today, followed the above steps, and VS still can't open XNA apps. Any thoughts? I've rebooted, stood on one foot, etc.Philippeville
@DavidLively: I didn't try to open existing projects. You should compare a newly created project with an old one, and "fix" the old one if you can. Do not hesitate to complete my post if you find the solution.Orphrey
The XNA projects don't show up in the "New Project" dialog. :/Philippeville
Please check that the folder C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0 actually contains folders ItemTemplates and ProjectTemplatesOrphrey
yes, they're there. @RickMartin's suggestion caused the XNA projects to show up, but I'm getting an error when trying to create a new game complaining that it can't load XNA.Framework. Argh.Philippeville
This still leaves out a bunch of registry junkDispersive
Hi, can anybody else offer a solution to David Lively's comment? I've followed all the steps in both answers here but I'm getting errors galore when trying to create new XNA projects in vs2012...Brockie
There's no registry junk necessary. Steve forgot to mention that you also need to remove the cached extension files or VS won't detect the changes. See my answer here: #9675258Modality
For the record none of this seems to work with 2012 Express. Not sure if extensions are allowed for this version though.Shroyer
Step 5 is what finalized it for me. Without step 5, it wouldn't open the .CSPROJ files. I ran step 5 on both the VS11 and VS10 directories (just change the number) and now I can run my game as in VS10. Woo hoo! P.S. Thanks :)Cetinje
Oh, I also got rid of the ~IC and ~PC folders in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0 (I just put them in another folder to get rid of them). That may have helped.Cetinje
It's working perfectly for me. I followed Steve B's instructions, but added Rick Martin's Cache clearing tip before running Step 5. The project templates show up, and I'm able to create new projects that compile to working applications. I'm Using VS2012 Premium, can't speak for the Express version though.Allonge
By the way, this solution works with Xbox 360 as well. I just tried it.Weaponeer
What I would like to add is that if you cannot install WP7 SDK on VS 2010/VS2012 pair in Windows 8, you should install this one before trying again microsoft.com/en-us/download/details.aspx?id=5549Aquifer
Thank you Steve B, this worked like a charm! I will report when I get any problems. Follow Step one to 5, struggled with some administration rights problems but nothing spetacular. (Win 7, moving existing Project from VS2010 Ultimate to VS2012 Ultimate. Both MSDNAA Editions and patched up-to-date)Rank
Any way to do this without installing the WP7 SDK? I have no need for it, and cannot afford to waste storage space on my SurfaceLatty
@SteveB - The SDK is required.Planogamete
I'm able to get the templates to show up in Windows Desktop Express, but cannot create or load projects yet. The proper paths for WDExpress should be modified to [...]\Common7\IDE\WDExpressExtensions\Microsoft for extensions and [...]\AppData\Local\Microsoft\WDExpress\11.0\Extensions for clearing the extension cache.Recuperator
Thanks very much for this, Steve! I've followed your instructions and everything appears to be working properly, except when I open a windows or xbox 360 project I get an error message "Windows is not a supported platform in this version of XNA Game Studio". I appear to be able to build and run my projects without problems, but am wondering if there's any way to be rid of the error message?Miser
This worked for me. FYI, you don't have to change Version attribute to "11.0" on the existing VisualStudio element, instead you can copy and paste it (i.e. so that you have two visual studio elements) each with the exact same content, except one says 10.0 and the other says 11.0. And then you can use the same .xml file for both 2010 and 2012. Works great for me.Jorin
@BrainSlugs83: thanks. I updated the answer to include your comment.Orphrey
I'm here to confirm that these steps also work for the current Visual Studio 2014 CTP. All you need to do is replace 11.0 with 14.0 (both in the directory names, cmd commands and when you are adding it to the extensions file).Gisellegish
K
65

On codeplex was released new XNA Extension for Visual Studio 2012/2013. You can download it from: https://msxna.codeplex.com/releases

Kassa answered 23/1, 2014 at 18:37 Comment(7)
You posted this just as I was sitting here trying to get Windows 8.1/VS2012 to play nicely with XNA. What can I say, it works. Well done and thanks.Darky
This is incontestably the correct answer. Thanks. And thanks to the product team to at least upgrade this framework for the latest developer tools.Orphrey
Is this created through legal means?Shovelnose
Amazing. Lazy as i was by still having a copy of 2010 for when i want to fiddle with XNA. This installed it easy and with lightning speed for Win7/VS2012. Now i can nuke my copy and fiddle some with an old project of mine. Thanks a lot!Ornithology
@MsXNA, Nice work, btw just wondering... What's the legality of this?Arin
Its legal. I mean, its hosted on codeplex, owned by microsoft. It doesn't contain any microsoft code, or very much code at all for that matter. Its just a set of msi installers, that they didn't even create, just redistributing, and a vsix visual studio extension, which ofc creating extensions for visual studio is perfectly legal.Chippy
@Justin Skiles Totally legit. Linked on the MSDN page for the XNA 4.0 Refresh (in the community additions section).Graveclothes
D
38

I found another issue, for some reason if the extensions are cached in the local AppData folder, the XNA extensions never get loaded.

You need to remove the files extensionSdks.en-US.cache and extensions.en-US.cache from the %LocalAppData%\Microsoft\VisualStudio\11.0\Extensions folder. These files are rebuilt the next time you launch

If you need access to the Visual Studio startup log to debug what's happening, run devenv.exe /log command from the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE directory (assuming you are on a 64 bit machine). The log file generated is located here:

%AppData%\Microsoft\VisualStudio\11.0\ActivityLog.xml

Driblet answered 7/6, 2012 at 18:58 Comment(2)
Hi, just letting you know that my guide doesn't seem to work anymore for VS2012, just removing the caches isn't enough. The end all way to remove the caches is to just install another extension from the extension manager (I updated NuGet).Modality
Thanks Tinco, updating NuGet (or another extension ) also works for VS2013.Clubwoman
M
31

There seems to be some confusion over how to get this set up for the Express version specifically. Using the Windows Desktop (WD) version of VS Express 2012, I followed the instructions in Steve B's and Rick Martin's answers with the modifications below.

  • In step 2 rather than copying to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\XNA Game Studio 4.0", copy to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpressExtensions\Microsoft\XNA Game Studio 4.0"
  • In step 4, after making the changes also add the line <Edition>WDExpress</Edition> (you should be able to see where it makes sense)
  • In step 5, replace devenv.exe with WDExpress.exe
  • In Rick Martin's step, replace "%LocalAppData%\Microsoft\VisualStudio\11.0\Extensions" with "%LocalAppData%\Microsoft\WDExpress\11.0\Extensions"

I haven't done a lot of work since then, but I did manage to create a new game project and it seems fine so far.

Menstruation answered 2/12, 2012 at 13:53 Comment(1)
Excellent! If you've followed these steps and the project template icons (in the app) show up as generic gray icons rather than colorful XNA icons; and you're geting all kinds of errors like "project subtype not supported" or "attempted to load assembly [...] XNA", clear the extension cache (as noted by Rick Martin) and follow these instructions again, making sure to have <Edition>WDExpress</Edition> added to the extension.vsixmanifest before you run WDExpress.exe /setup.Recuperator

© 2022 - 2024 — McMap. All rights reserved.