Is it possible to create XNA games using Visual Studio 2012?
Yes, it's possible with a bit of tweak. Unfortunately, you still have to have VS 2010 installed.
First, 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 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"
Run notepad as administrator then open extension.vsixmanifest in the destination directory just created.
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>
Don't forget to clear/delete your cache in %localappdata%\Microsoft\VisualStudio\12.0\Extensions.
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.
On codeplex was released new XNA Extension for Visual Studio 2012/2013. You can download it from: https://msxna.codeplex.com/releases
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
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.
Related
After I save the changes of a solution and then remove an existing project, I'll get the following error message:
The operation could be completed. Not implemented.
Then I launched devenv.exe /Log and able to reproduce the problem and the errors are:
Extension will not be loaded because an extension with the same ID 'Microsoft.Windows.DevelopmentKit.Desktop' is already loaded at
C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\
C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\
Extension will not be loaded because an extension with the same ID 'Microsoft.WinJS' is already loaded at
C:\PROGRAM FILES (X86)\MICROSOFT SDKS\WINDOWS\V8.1\EXTENSIONSDKS\MICROSOFT.WINJS.SHARED\VSIX\
C:\PROGRAM FILES (X86)\MICROSOFT SDKS\WINDOWS\V8.0\EXTENSIONSDKS\MICROSOFT.WINJS.SHARED\VSIX\
It looks like it's trying to load two extensions but with different versions. I believe they are the Microsoft Advertising SDK for Windows 8.1 and Microsoft Advertising SDK for Windows Phone 8.1 but even if I launch VS 2012 with Admin, the Uninstall button is greyed out for me. I don't see them in the Add/Remove Programs either. So how can I get rid of this error?
A side note, I have both VS 2012 and VS 2013 installed and I had to do a repair on VS 2012 after VS 2013 was installed.
I had the same problem with Microsoft Windows Development Kit: two errors every time at Visual Studio start with description in the
%AppData%\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
Sometimes (I think every time) Visual Studio Updater or Installer (when you try to install other version of VS) does not remove already installed version of a VS module.
In my case I had the second WDK with older version but installed after the newer one. I manually uninstalled the older version of Microsoft Windows Development Kit and problem with Visual Studio was solved.
I use Visual Studio 2012 and this is the only version of Visual Studio I have installed. I need to build certain C++ projects with the v90 platform toolset (of Visual Studio 2008), but I can't install Visual Studio 2008.
I understand it is possible to use the v90 platform toolset by installing Windows SDK 7.0. How exactly is it done? If I simply use the web installer of 7.0 SP1, I still don't see v90 as one of the possible platform toolsets.
It is possible, but apparently requires some maneuvering and will not support building MFC applications. The following assumes that VS2012 update 4 is installed, but neither VS2010 nor VS2008 are installed.
Download the x86 DVD of SDK 7.0 SP1 (GRMSDK_EN_DVD.iso). Mount the ISO or extract its contents, and manually install the MSI files from the following folders under the Setup folder:
WinSDK (this may fail, it's ok)
WinSDKBuild
WinSDKInterop
WinSDKTools
WinSDKWin32Tools
vc_stdx86
vc_stdamd64
winsdk_intellidocs
WinSDKIntellisenceRefAssys
WinSDKNetFxTools
Download the x86 DVD of SDK 7.1 (GRMSDK_EN_DVD.iso). Mount the ISO or extract its contents, and manually install the MSI files from the same folders listed above (except winsdk_intellidocs, which doesn't exist).
Go to C:\Program Files (x86)\Microsoft Visual Studio 9.0. Copy the following files from Common7\IDE to VC\bin:
msobj80.dll
mspdb80.dll
mspdbcore.dll
mspdbsrv.exe
Now you should be able to choose the v90 platform toolset in Visual Studio 2012 and build with it.
Explanations (and sources):
Individual MSI installation is based on the second workaround from this connect report.
The requirement for both 7.0 and 7.1 is based on this question (both VS2010 and VS2008 are required to use v90 in VS2012!). SDK 7.1 is not needed if you have VS2010.
DLL/EXE copying requirement is based on yet another question. If you do not copy them, you will see error MSB6006: "CL.exe" exited with code -1073741515.
In addition to this answer I want to add that
You can install SDK 7.0 simply by running setup, there is no problem with it.
You can install SDK 7.1 by running setup, if you remove Microsoft Visual C++ 2010 Redistributables first and fix following registry values:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client]
"Version"="4.0.30319"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full]
"Version"="4.0.30319"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Client]
"Version"="4.0.30319"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v4\Full]
"Version"="4.0.30319"
You can (and probably should) restore these values to whatever they originally were after installation is complete.
Do not forget to install KB2519277 after this, it updates compilers in SDK 7.1 to SP1.
You don't need to copy any dll. MSBuild uses
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC#ProductDir
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC#ProductDir
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS#ProductDir
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VS#ProductDir
to set up paths. It's probably wise to fix them to point to "C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\" and "C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\" as it might be useful elsewhere in build process.
Same goes for version 10.0 if you plan to use Windows7.1SDK toolset.
Use WindowsSdkVer.exe to set current SDK to 7.1 to defeat cryptic error in Microsoft.Cpp.x64.Targets(63,5) about missing unnamed required file. If the tool gives you error, then set these values manually:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows#CurrentInstallFolder
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows#CurrentInstallFolder
to point to newly installed SDK. The tool needs some registry keys from Visual Studio installation to work properly, but there are many and I'm not sure which are important.
Reboot. None of the above asks you to, but without reboot I got errors when trying to build a project.
As an aside, SDK7.1 adds v100 toolset, but it won't work, saying something about Could not find WindowsSDKDir variable from the registry. This is because v100 actually requires SDK7.0A which comes with Visual Studio 2010 and is not available separately. Windows7.1SDK toolset is the one which utilises VC2010 compilers if you need them.
Microsoft.Cpp.Win32.*.props files have a lot of relevant stuff if something fails in build system.
One addition/update for VS2013 to Yodans answer:
My working setup:
VS2013 has to use VS2010 libs
Using WinSDK 7.1 (Yodans 2.) build tools (v100) in VS2013
clean install, uninstalling everything mentioned in the sdk release notes (can be downloaded at http://www.microsoft.com/en-us/download/details.aspx?id=8279 under category Details)
Microsoft Windows SDK for Windows 7 (7.1) (the Windows SDK core-component files)
Application Verifier
Debugging Tools for Windows
Windows Performance Toolkit
Microsoft Help Viewer 1.0
Microsoft Visual C++ 2010 Redistributable
Microsoft Visual C++ 2010 Standard Edition
Additionally removed all .NET and VC++ related MS Software (not tested if necessary)
choosing Windows7.1SDK as Platform Toolset in VS2013
error MSB6006: "CL.exe" exited with code -1073741515
cl.exe uses msobj100.dll, mspdb100.dll, mspdbcore.dll and mspdbsrv.exe
Added to PATH C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Build works and binary is usable ( So now its tested Yodan ;-) )
My mistake:
copied files in 7. above to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin (Yodans 3.), believing this dir is in PATH, but it was not!
So better do as sugested by Yodan and tested by myself in 8. above
p.s. same answer is solving this problem:
Visual Studio 2013: CL.exe exited with code -1073741515
A few days ago I opened VS2012 just like I do every day and after getting the page where you select the project to open, VS2012 crashed. Restarting the computer, getting all latest Windows updates and playing with registry values did not help at all. See below for answer on how to fix this issue.
It turns out the problem is Internet Explorer 11. It turns out that installing IE11 is what caused VS2012 to crash and be useless. This will fix the issue:
You need to re-register ieproxy.dll - after this VS2012 started to work again.
32 bit systems:
regsvr ieproxy.dll
64 bit systems:
regsvr32 ieproxy.dll
This worked like a charm for me:
FIRSTLY: To minimize the potential loss of your personal environment, you should consider creating a backup of your environment using the Export Settings wizard, and the Import Settings wizard to restore the settings if and when needed.
Delete the contents from the following folders:
C:\Users\..\AppData\Local\Microsoft\Team Foundation
C:\Users\..\AppData\Local\Microsoft\VisualStudio
C:\Users\..\AppData\Local\Microsoft\VSCommon
Go to the Visual Studio IDE folder in command prompt and Run the following command:
.\devenv.exe /resetuserdata from the Visual Studio IDE folder.
Typical location of Visual Studio IDE folder for 64 bit: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Typical location of Visual Studio IDE folder for 32 bit: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE
Reference: Microsoft's article- If you have problems with TFS or Visual Studio flush the user cache … or not?
I am trying to do some perf. analysis on a piece of code that is dog slow... I start VS2012 Premium as Admin, load my solution and the go to 'Analyze - Launch Performance Wizard' Immediately I am shown a dialog that says:
Could not load file or assembly 'VSPerfReader.DLL' or one of its dependencies.
Awesome! The file is located here:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
I can start Windows Performance Analyzer (standalone) from 'start' just fine btw.
Had the same issue, adding the following line to my system path variable and restarting visual studio did the trick.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools
Credit to Ade Miller in the comment for the solution.
Same instructions as Ryan Taylor above but with a visual. My issue was with Visual Studio 2013 (after installing VS2015 SP1). The value I entered the new path variable is below.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools
I am facing a problem with integrating Microsoft Platform SDK with Visual Studio 2005 Express, now it looks like it does not include it with the default installation.
So I installed Microsoft Platform SDK for Windows 2003 (as reccomended by http://www.zedwood.com/article/134/visual-studio-express-2005-and-the-platform-sdk) and carried out accordingly) - Althogh I could not find C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaultscorewin_express.vsprops, so I could not comment out what he reccomended.
But the problem I face is that I have compiling from command line cl.exe, and it does not seem to be finding io.h (which I understand is part of the Microsoft Platform SDK) and doesn't seem to be included in Visual Studio 2005 Express.
How would I include this (io.h) file when compiling? (I know you can add INCLUDE values in the IDE, but as it's command line I don't think it will work - I have tried)
Note: Unfortunately I am restricted in using Visual Studio 2005 express, so I can't upgrade etc.
This has been driving me mad, so any help would be appreciated.
io.h should be in the C runtime include directory, not the SDK's. Something like:
C:\Program Files\Microsoft Visual Studio 8\VC\include\io.h
If you're running builds from the command line make sure the environment is set correctly. One way to do that is to run the \Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat script which should have been installed by VC2005 Express (there should be a shortcut to it on the start menu).