Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
A colleague wrote a blog post today that describes the process of converting a game created from the XNA Game Studio 3.1 version of the platformer starter kit to the XNA Game Studio 4.0 CTP and getting it to run on the Windows Phone 7 Series emulator. The blog post walks through the process of creating a 3.1 version of the game, creating a new 4.0 project for it, importing the code and content, updating the code to handle differences between the XNA Framework 3.1 and 4.0, and making some Windows Phone-specific changes.
Here are links with additional information:
There is some training material available on the Channel 9 site to help you get started with development for the Windows Phone 7 Series using the Windows Phone Developer Tools. This training material includes labs and source code for games created with XNA Game Studio 4.0 and the XNA Framework 4.0 for Windows Phone.
Here are some links to the training material that has been posted so far:
I encourage you to take a look at the training material to help you get started developing for Windows Phone 7 Series using the Windows Phone Developer Tools CTP and the XNA Game Studio 4.0 CTP.
Since the release of the Windows Phone Developer Tools CTP and the XNA Game Studio 4.0 CTP yesterday, we’ve heard from several people who have had problems deploying XNA Game Studio 4.0 games to the Windows Phone Emulator. This issue is described in the Windows Phone Developer Tools CTP release notes, but I wanted to post a summary here as well to hopefully make it easier to find in search engines.
Instead of being able to deploy and run their XNA Game Studio 4.0 Windows Phone game successfully in the emulator, some people see the following in the Visual Studio error window:
Deploy failed with the following error: The current display adapter does not meet the emulator requirements to run XNA Framework applications.
Behind the scenes, XNA Game Studio 4.0 is checking for a DirectX 10 or later graphics card because this functionality is required to be able to render XNA Framework graphics correctly in the emulator.
Using the DirectX Caps Viewer to check the capabilities for your graphics card
If you see the above error message when attempting to deploy an XNA Game Studio 4.0 Windows Phone game to the emulator, you can use the DirectX Caps Viewer Tool (available for download via the DirectX SDK) to determine if a graphics card supports DirectX 10 or later. To determine if a graphics card supports DirectX 10 or later:
Searching for updated drivers on your graphics card manufacturer’s web site
If you see this error message and your graphics card is DirectX 10-capable as reported by the DirectX Caps Viewer Tool, you should check on the web site for the manufacturer of your graphics card to see if a newer driver is available. In many cases, we’ve seen newer drivers available on the graphics card manufacturer’s web site than are available on Windows Update or the PC manufacturer’s web site.
Additional updates that need to be installed if you are running Windows Vista
If you’re attempting to use the emulator on Windows Vista, you must first install Windows Vista SP2 and the following 4 updates that are a part of KB 971644. Here are the links for the x86 versions of these 4 updates:
Here are the links for the x64 versions of these 4 updates:
How to try to bypass the capabilities check as a last resort
It is possible to bypass this capabilities check in XNA Game Studio by setting the following registry value:
[HKEY_LOCAL_MACHINE\Software\Microsoft\XDE] XNAEnableGPU = 1 (REG_DWORD)
If you are running a 64-bit OS, you must set the registry value at the following location:
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\XDE] XNAEnableGPU = 1 (REG_DWORD)
Important note – if you set the above registry value, the XNA Game Studio 4.0 Windows Phone Game project will most likely be able to deploy but will only see a blank black screen in the emulator if the required graphics card capabilities are not available. We put in this registry override as a last resort in case we ran into issues with the capabilities check reporting false negatives, but so far we haven’t seen any cases where the deployment was blocked but then it correctly displayed the game after setting the override registry value.
<update date="3/18/2010"> Added links to x64 versions of the 4 updates that are a part of KB971644. </update>
Earlier today in the MIX10 keynote, Scott Guthrie announced the availability of the Windows Phone Developer Tools CTP. This CTP is available for download starting today, and the setup package will download and install the following:
Windows Phone Developer Tools information
Here are some links and information to help you get started installing and using the Windows Phone Developer Tools CTP:
XNA Game Studio-specific information
For XNA Game Studio developers, it is important to note that there is not a standalone installer for the XNA Game Studio 4.0 CTP like you have been used to from past releases. Instead, you will need to download and install the Windows Phone Developer Tools CTP, and that will install the XNA Game Studio 4.0 CTP for you behind the scenes.
Here are some links to information that is specific to the XNA Game Studio 4.0 CTP:
One important note - the XNA Game Studio 4.0 CTP includes project templates for Xbox 360 games in addition to Windows and Windows Phone games. However, you cannot deploy, run or debug Xbox 360 games created with this CTP.
If you encounter Windows Phone Developer Tools CTP setup failures
If you run into an installation or uninstallation failure for the Windows Phone Developer Tools CTP, you can use the log collection tool to gather your setup log files.
For this CTP, this tool does not gather XNA Game Studio 4.0 setup log files, so if your setup failure is caused by the XNA Game Studio 4.0 component, you’ll need to gather those logs separately by zipping up all of the logs in the folder named %temp%\XNA Game Studio 4.0 Setup\Logs.
Once you have gathered your setup log files, you can upload them to a file server of your choice (such as http://skydrive.live.com), and post a link to the log files in the forums to get additional support.
If you run into uninstallation issues, you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove XNA Game Studio or the Windows Phone Developer Tools.
There was some information announced today at GDC 2010 about the upcoming XNA Game Studio 4.0 release and support it will provide for developing games for Windows Phone 7 Series, Xbox 360 and Windows. I encourage you to check out some of the links below to start learning about this new version of XNA Game Studio:
My colleague, Stephen Styrchak, has created a Visual Studio 2008 add-in that allows you to debug an XNA Game Studio content pipeline extension from within Visual Studio 2008 as you are developing it. Since it is a Visual Studio add-in, you can only install it in Visual Studio 2008 Professional Edition or higher – it will not work if you are using XNA Game Studio 3.1 in Visual C# 2008 Express Edition.
Here are links with some additional information about Stephen’s add-in:
If you are developing a content pipeline extension for your XNA Game Studio 3.1 game, I encourage you to check out Stephen’s blog and his add-in so you can debug your content pipeline extension from Visual Studio 2008.