Aaron Stebner's WebLog

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

November, 2011

  • Aaron Stebner's WebLog

    Link to more information about the Program Install and Uninstall Troubleshooting Tool


    There is a new general-purpose installation troubleshooting tool called the Program Install and Uninstall Troubleshooting Tool that has been available on the Microsoft support site for a little while, and I want to post some information about this tool to help make it easier for people to find it.

    This tool is conceptually similar to the .NET Framework cleanup tool, but it is more generic and can be used to clean up any MSI-based installation on a computer.  It also performs more robust back-up steps prior to cleaning up in case you need to roll back to a previous state.

    Where to download the Program Install and Uninstall Troubleshooting Tool

    You can find more information about the Program Install and Uninstall Troubleshooting Tool and download it from the following locations:

    Summary information about the tool

    The Program Install and Uninstall Troubleshooting Tool can be used to automatically diagnose problems that can prevent installing and uninstalling programs on your computer.  It can help resolve some errors that prevent programs from uninstalling, installing or updating correctly.  Here is a list of issues that this tool is currently able to fix:

    • Resolves some problems that can prevent programs from being successfully uninstalled (which can block re-installations and update installation).
    • Removes an incorrect registry key that can cause some installers to fail on 64-bit operating systems.
    • Fixes corrupted patch data in Windows Installer registry keys.

    This tool is designed as a last resort for cases where install, uninstall, repair or patch installation did not succeed for unusual reasons. It is not a substitute for the standard uninstall procedure.  You should use only use this tool to uninstall a program if the program fails to uninstall using the entry in the Programs and Features control panel.

    More details about how the tool works

    The Program Install and Uninstall Troubleshooting Tool does the following behind the scenes when you use it to uninstall a program:

    • Creates a system restore point prior to removing program files and registry entries.  This restore point can be used to return the computer to the state prior to any action taken by the tool.
    • Makes back-up copies of all files and registry entries that it will remove to a folder under c:\MATS\<ProductCode>.
    • Backs up files in sub-folders that correspond to the system drive letters.  For example: c:\MATS\<ProductCode>\FileBackup\c\...
    • Backs up registry information in an XML file. 
    • Creates a PowerShell script that can be used to automatically restore file and registry information deleted by the tool.  The PowerShell script will be located at C:\MATS\<ProductCode>\RestoreYourFilesAndRegistry.ps1, and you can double-click on it to run it if you have PowerShell installed.
    • Stores additional information in the registry about actions that it has taken.  This information can be found at the following location:


      The most useful piece of information stored at this location in the registry is the return value received when MATS attempted to run msiexec /x to uninstall the product.

    The Program Install and Uninstall Troubleshooting Tool requires Windows Installer product codes in order to know what file and registry information to remove from the computer.  For programs that are listed in the tool UI, the product code will appear as a tool tip when you mouse over the product name.  If you choose the Not Listed option in the tool UI, you can use a tool like MsiInv to determine the product code.

  • Aaron Stebner's WebLog

    Possible error when building a Silverlight application on a computer that does not have XNA Game Studio 4.0 installed


    If you use the Windows Phone SDK 7.1, it is possible to get an error like the following when building a Silverlight project:

    The target "GetCopyToOutputDirectoryContentProjectItems" does not exist in the project.

    How to resolve this issue

    In the cases that I’ve seen this error in the past, it was caused by XNA Game Studio 4.0 not being correctly installed on the computer.  If you encounter this error, I suggest trying one of the following:

    1. Repair or re-install the Windows Phone SDK 7.1, which will repair XNA Game Studio 4.0 behind the scenes.
    2. If #1 does not help, then you can use the cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove the Windows Phone SDK 7.1 and then re-install it.

    More details about the root cause of the issue

    The GetCopyToOutputDirectoryContentProjectItems target is defined in an MSBuild .targets file installed by XNA Game Studio 4.0.  In the Windows Phone SDK 7.1, one of the Silverlight .targets files has a dependency on this XNA Game Studio 4.0 build target in order to support building the new combined Silverlight and XNA applications.  This dependency exists for standard Silverlight projects in addition to Silverlight and XNA application projects.  As a result, it is possible to get into a state where you cannot build a Silverlight project in the Windows Phone SDK 7.1 when XNA Game Studio 4.0 is not installed even if you are not using XNA Game Studio features in your Silverlight project.

  • Aaron Stebner's WebLog

    Benign warning when creating a Silverlight and XNA Application project in the Windows Phone SDK 7.1


    I have seen several people ask about this scenario on the App Hub forums, and I wanted to write a blog post to help raise visibility because it is hard to find in the release notes.

    Description of the issue

    The Windows Phone SDK 7.1 introduces the ability to create applications that combine Silverlight and XNA Framework technologies.  If you create a new Windows Phone Silverlight and XNA Application using the project template that ships with the Windows Phone SDK 7.1, you will see a warning like the following in the Visual Studio error window:

    The project 'SlXnaApp1Lib' cannot be referenced.  The referenced project is targeted to a different framework family (.NETFramework)

    This warning will not prevent you from building or running the Silverlight and XNA Application project, and you can safely ignore the warning.

    More details about the root cause of the issue

    A Silverlight and XNA Application includes a Silverlight project, an XNA Game Studio Windows Phone Game Library project and an XNA Game Studio content project.  The Silverlight project is the parent project, and it includes a project-to-project reference to the XNA game library project.  The warning occurs because Visual Studio detects that the XNA project does not target the same .NET Framework profile as the Silverlight project.  However, on Windows Phone, there is only one .NET Framework profile, regardless of what the target framework settings are in the project files, so the warning does not indicate any possible functional problems when you build and run your application.

Page 1 of 1 (3 items)