Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

September, 2010

  • Aaron Stebner's WebLog

    How to fix compatibility mode error that can appear when installing Windows Phone Developer Tools or Visual Studio 2010

    • 46 Comments

    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:

    1. Click on the start menu, choose Run, type regedit and click OK.
    2. Browse to each of the following keys and delete any value that refers to the WPDT setup program (named vm_web.exe):

      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

    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.

  • Aaron Stebner's WebLog

    Final versions of Windows Phone Developer Tools and XNA Game Studio 4.0 now available for download

    • 6 Comments

    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:

    1. If you have either of the previous Windows Phone Developer Tools CTPs or the beta installed, you will need to uninstall them first.  You can do that by going to the Programs and Features control panel and choosing to remove the item named Microsoft Windows Phone Developer Tools CTP – ENU or Microsoft Windows Phone Developer Tools Beta – ENU.  This item will remove the other components that need to be removed.
    2. If you have the Visual Studio 2010 RC on your system, you will also need to uninstall that before you can install WPDT.
    3. (optional) If you plan to also use another VS 2010 edition (such as Professional, Ultimate, C# Express, etc) in addition to WPDT, you should install them before you install WPDT.  If you install them after WPDT, you will be prompted to download and install a Silverlight update when trying to use them.
    4. After removing previous WPDT CTPs and beta and the VS 2010 RC (if you had it installed still) and installing other VS 2010 editions (if you choose to), you can proceed with installing WPDT.

    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>

     

  • Aaron Stebner's WebLog

    The final release of XNA Game Studio 4.0 is coming soon

    • 4 Comments

    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:

    • Support for developing Windows and Xbox 360 games (tools, XNA Framework assemblies, Visual Studio 2010 integration, documentation, etc)
    • Support for developing Windows Phone games, but only if installed with the Windows Phone Developer Tools
    • Standalone XNA Framework Redistributable 4.0 for creating installers for Windows games

    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:

    • Windows Vista and Windows 7
    • Windows Phone game development in Visual Studio 2010 Professional or better and Visual Studio 2010 Express for Windows Phone
    • Xbox 360 and Windows game development in Visual Studio 2010 Professional or better, Visual C# 2010 Express and Visual Studio 2010 Express for Windows Phone
    • You do not need to install an edition of Visual Studio 2010 before installing Windows Phone Developer Tools

    The standalone XNA Game Studio 4.0 package supports the following:

    • Windows XP, Windows Vista and Windows 7
    • Xbox 360 and Windows game development in Visual Studio 2010 Professional or better and Visual C# 2010 Express
    • No Windows Phone game development – you must install Windows Phone Developer Tools to do this
    • You must install an edition of Visual Studio 2010 on your own before installing the standalone XNA Game Studio 4.0 package
  • Aaron Stebner's WebLog

    How to reset the default deployment target in Windows Phone Developer Tools to the emulator

    • 4 Comments

    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:

    1. Close any instances of the emulator and Visual Studio 2010 that are running on your computer
    2. Delete the folder named “%LocalAppData%\Microsoft\Phone Tools”
    3. Re-start Visual Studio 2010
  • Aaron Stebner's WebLog

    Steps to upgrade an XACT project so it can be used with XNA Game Studio 4.0

    • 2 Comments

    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:

    1. Make a backup copy of your .xap file if you would like to keep a copy of the .xap file from before upgrading it with the XACT tool.
    2. On a system with XNA Game Studio 4.0 installed, click on the Start menu, choose All Programs, then Microsoft XNA Game Studio 4.0 | Tools | Microsoft Cross-Platform Audio Creation Tool 3 (XACT3).
    3. In the Microsoft Cross-Platform Audio Creation Tool 3 (XACT3) tool, open the .xap file from the project that you upgraded from XNA Game Studio 3.1 to XNA Game Studio 4.0.  When it loads, you should see the following message in the XACT UI:

      ---------------------------
      XACT Version Mismatch
      ---------------------------
      This project file was created with the March 2009 release of XACT. You are running the February 2010 release.
      If you save this project, it will be saved as the current version and may no longer work with the version of
      XACT it was originally created with.
      ---------------------------
      OK  
      ---------------------------

    4. Click OK to upgrade the .xap project to the new February 2010 format.
    5. Save the .xap project in the XACT UI and close the XACT UI.
    6. Go back to Visual Studio 2010, open the project that you upgraded from XNA Game Studio 3.1 to 4.0 and choose to build it again.

    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:

    • Attempting to compile an XNA Game Studio 4.0 project that was upgraded from XNA Game Studio 3.0 or 3.1 that includes an XACT project

      This is the scenario that the workaround above applies to

    • Attempting to compile an XNA Game Studio 3.1 project that includes an XACT2 project

      This is similar to the scenario that the workaround above applies to.  You can find more details about this scenario in this blog post.

    • Attempting to compile an XNA Game Studio 3.0 or 3.1 project that includes an XACT project created with the version of XACT that ships with XNA Game Studio 4.0

      This is the inverse of the above scenario. You need to create a new version of your XACT project using one of the XACT tools included with XNA Game Studio 3.1 at the following location on the start menu:  All Programs | Microsoft XNA Game Studio 3.1 | Tools.  You should use Microsoft Cross-Platform Audio Creation Tool 2 (XACT2) for XNA Game Studio 3.0 projects and Microsoft Cross-Platform Audio Creation Tool 3 (XACT3) for XNA Game Studio 3.1 projects.

    • Attempting to compile an XNA Game Studio 4.0 project that includes an XACT project created with a version of the XACT tool other than the one that ships with XNA Game Studio 4.0 (for example, the version of XACT in the DirectX SDK)

      This is similar to both of the above scenarios.  You need to make sure the XACT project is saved in the format of the version of XACT that ships with the version of XNA Game Studio that you are using.

  • Aaron Stebner's WebLog

    XNA Game Studio Connect beta for XNA Game Studio 4.0 now available for download

    • 0 Comments

    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:

  • Aaron Stebner's WebLog

    Assembly references in XNA Game Studio 4.0 beta projects need to be updated after installing the final release

    • 0 Comments

    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:

    1. Go to the Visual Studio solution explorer
    2. Expand the References node for your game project(s) and content project(s)
    3. For any XNA Framework assembly references that do not resolve correctly, delete them by right-clicking and choosing Remove or just by pressing the Del key
    4. Right-click on the References node, choose Add Reference... and re-add any references that you removed in step 3

    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:

Page 1 of 1 (7 items)