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.
I have heard from a few people who tried to install the final release of the Windows Phone Developer Tools but get an installation error like the following:
Visual Studio setup cannot run in compatibility mode. For more information see the 'Installing' section in the Visual Studio readme at http://go.microsoft.com/fwlink/?LinkID=143397.
The link in the error message points to the Visual Studio 2010 readme because this issue can affect all editions of Visual Studio 2010, including WPDT. Item 2.1.10 in that readme provides a workaround for this issue. In my past experience, that workaround has proven to be incomplete though, so here are some updated steps that usually help solve this type of error:
If the above doesn’t help, then you can also try to save vm_web.exe to your computer and run it from there. When compatibility mode is triggered by Windows, it is based on a full path to the setup executable, so if you save it to a different location than you previously tried to run it from and then run it again, that can help avoid triggering compatibility mode.
As announced on the Windows Phone Developer Blog, the final release of the Windows Phone Developer Tools (WPDT) (which includes the final release of XNA Game Studio 4.0) is now available for download.
Getting started links – Windows Phone Developer Tools
Here are links to help you get started installing and using the Windows Phone Developer Tools:
Here are links for documentation and support related to the Windows Phone Developer Tools:
Getting started links – XNA Game Studio 4.0
Here are links to help you get started installing and using XNA Game Studio 4.0:
Note – deploying, running and debugging Xbox 360 games with XNA Game Studio 4.0 requires an updated version of XNA Game Studio Connect on the Xbox 360 console. As noted on the XNA team blog, there will be a beta version of XNA Game Studio Connect that supports XNA Game Studio 4.0. It was supposed to release today along with the final release of XNA Game Studio 4.0, but there have been some slight delays, and it will be released very soon. Please keep an eye on the XNA team blog and the Creators Club site for an announcement when the XNA Game Studio Connect beta is available for download.
Here are links for documentation and support related to XNA Game Studio 4.0:
How to install Windows Phone Developer Tools
Here are steps you can use to install the Windows Phone Developer Tools:
If you encounter setup failures
If you run into an installation or uninstallation failure for the Windows Phone Developer Tools, you can use the log collection tool to gather your setup log files. This log collection tool will create a file named %temp%\vslogs.cab.
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 with the WPDT CTP, CTP Refresh or Beta, you can use the information at http://blogs.msdn.com/b/astebner/archive/2010/07/12/10037442.aspx to remove XNA Game Studio or the Windows Phone Developer Tools.
<update date="10/11/2010"> Fixed link to the release notes that was still pointing to old beta information. </update>
Many folks noticed the recent post on the Windows Phone Developer Blog that announced a September 16, 2010 release date for the Windows Phone Developer Tools. XNA Game Studio users have noted that CTP and beta versions of WPDT have included pre-release builds of XNA Game Studio 4.0, and they have asked whether that implies that XNA Game Studio 4.0 is shipping then as well. Today, Kathleen posted more details about the answer to this question on the XNA team blog, and I wanted to summarize it here as well and provide a bit more detail about the scenarios that will be supported when XNA Game Studio 4.0 is released.
When will XNA Game Studio 4.0 be available, and what will it include?
The Windows Phone Developer Tools will ship on September 16, and XNA Game Studio 4.0 will also ship on September 16. The final release of XNA Game Studio 4.0 will include the following:
Along with XNA Game Studio 4.0, we will be shipping a beta version of a version of XNA Game Studio Connect that will allow you to deploy, run and debug XNA Framework 4.0 Xbox 360 games if you have an XNA Creators Club premium membership. We will release the final version of XNA Game Studio Connect in the future, but the API surface area will be the same because that is defined by the XNA Framework reference assemblies that ship with XNA Game Studio 4.0. That means that once the final version of XNA Game Studio Connect is released, you should not have to make any code changes to your game in order to get it to run correctly.
Where will I be able to get XNA Game Studio 4.0?
XNA Game Studio 4.0 will be available to install as a part of the Windows Phone Developer Tools installer or via a standalone package. Windows Phone Developer Tools setup will install the same XNA Game Studio 4.0 package that will be available as a standalone download, and it will install some additional components to enable Windows Phone development. The supported scenarios differ somewhat based on how you choose to install XNA Game Studio 4.0.
Windows Phone Developer Tools supports the following:
The standalone XNA Game Studio 4.0 package supports the following:
A few folks have noticed that after uninstalling pre-release builds of the Windows Phone Developer Tools and installing the final release, the default value for the deployment dropdown for Silverlight and XNA Game Studio 4.0 Windows Phone projects is the device instead of the emulator. The default value is supposed to be set to the emulator in all cases, but in some cases, uninstalling previous builds of WPDT leaves behind some information that causes the default value to be reversed. If you run into this, you can reset it by doing the following:
If you have an XNA Game Studio 3.1 project that includes an XACT audio project and plan to upgrade it to XNA Game Studio 4.0, there is an additional manual step you must take to upgrade your XACT project to the newer XACT file format required by XNA Game Studio 4.0.
We updated the XACT tools used by XNA Game Studio 4.0 at the last-minute due to an issue that we discovered shortly before shipping. Unfortunately, we did not have time to add information about how to upgrade XACT projects to the XNA Game Studio 4.0 upgrade documentation. Hopefully this blog post will help folks who run into this issue figure out how to upgrade their XACT projects so they will work correctly with XNA Game Studio 4.0.
Description of the issue
If you have an existing XNA Game Studio 3.1 project that uses an XACT audio project, then you upgrade your project to XNA Game Studio 4.0, you will see an error like the following in the Visual Studio error list when you attempt to compile it with XNA Game Studio 4.0:
The .xap file was created with a version of XACT that is incompatible with the XNA Framework Content Pipeline version used by this project. Refer to the documentation for options to resolve this mismatch.
How to update an XACT project from XNA Game Studio 3.1 to the format required by XNA Game Studio 4.0
Here are some more specific steps you can use to upgrade an XACT project used in XNA Game Studio 3.1 to the version of XACT required by XNA Game Studio 4.0:
Additional notes about this error message
The steps above explain how to upgrade an XACT project created with XNA Game Studio 3.1 to an XACT project that can be used with XNA Game Studio 4.0. However, there are a few different scenarios where the “.xap file was created with a version of XACT that is incompatible with the XNA Framework Content Pipeline version used by this project” error message can occur, so the above workaround may not successfully resolve this error in all cases.
Here are some of the possible configurations where this error will occur:
Last week, we released XNA Game Studio 4.0 and the Windows Phone Developer Tools. However, there was a slight delay in the release of the new XNA Game Studio Connect beta that allows you to deploy, run and debug 4.0 games on your Xbox 360. As announced on the XNA team blog this morning, the XNA Game Studio Connect beta is now available for download on the Xbox LIVE Marketplace.
You will need to delete the version of XNA Game Studio Connect that you have installed on your Xbox 360 console, then download the new one. You can find more detailed steps in this blog post and this news item.
If you are planning to use XNA Game Studio 4.0 for Xbox 360 game development, I encourage you to download and try out the XNA Game Studio Connect beta. If you run into any issues, please report them at the following locations:
Since we released the final version of the Windows Phone Developer Tools and XNA Game Studio 4.0, I’ve heard from a few people who were using the beta version of the tools, upgraded to the final release, and ran into errors when compiling their XNA Game Studio 4.0 projects. I want to describe the errors, the root cause and the fix in more detail in case anyone runs into this in the future.
Description of this issue:
After upgrading from the beta to the final release, some XNA Game Studio 4.0 projects created with the beta may fail to compile with errors like the following:
Could not resolve this reference. Could not locate the assembly "Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
There was a breaking change in XNA Game Studio 4.0 between the beta and RTW that will require you to update any projects that you created with pre-release builds of the tools. There is a note about this issue in the Breaking Changes for Windows Phone Developer Tools from Beta to RTM section of the release notes, but it is pretty easy to miss, and it doesn’t include searchable text that includes the exact error message:
The public key token for XNA Framework assemblies has changed. Assembly references in content projects and game projects created using previous releases of Windows Phone Developer Tools must be updated to work correctly. You can do this by removing and re-adding references that do not resolve correctly using the References node in the Visual Studio Solution Explorer.
The XNA Framework public key token value changed from 6d5c3888ef60e27d to 842cf8be1de50553 in the final release of XNA Game Studio 4.0. This causes assembly references to XNA Framework assemblies in projects created before this change to no longer resolve correctly once you update to the final release of XNA Game Studio 4.0.
How to resolve this issue:
You can use the following specific steps to resolve this issue if you run into it for XNA Game Studio 4.0 projects created with pre-release builds of the tools:
References that do not resolve correctly will show up with a little yellow and black exclamation mark next to them like the content pipeline assemblies referenced by the content project in this example: