Aaron Stebner's WebLog

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

July, 2010

  • Aaron Stebner's WebLog

    Possible installation problems with .NET Framework 2.0, 3.0 and 3.5 hotfixes that can remove assemblies from the GAC

    • 2 Comments

    A couple of new knowledge base articles related to failed installations of .NET Framework 2.0, 3.0 and 3.5 hotfixes were published this week that I want to link to in order to hopefully help provide more visibility into the issues that they describe.  You can find the articles at the following locations:

    Summary of the issue

    To summarize the issues described in these knowledge base articles, hotfixes for the .NET Framework 2.0, 3.0 and 3.5 can fail to install if the hotfix attempts to update an assembly that is installed in the global assembly cache (GAC) and that assembly is held in use with a hard lock by another application running on the system.  To make matters worse, when a .NET Framework hotfix fails to install due to hard-locked files, the original file can end up being removed from the GAC entirely, which can cause .NET Framework applications to fail to run correctly on the system afterwards.

    In general, hard locks are very rare and very few applications will load .NET Framework assemblies in a way that causes them to be hard-locked.  There is a tool described in this blog post that can be used to simulate hard locks if you need to test this type of scenario.

    This issue only affects hotfixes for MSI-based versions of the .NET Framework (so it will not affect the .NET Framework 2.0 or 3.0 on Windows Vista or the .NET Framework 2.0, 3.0 or 3.5 on Windows 7 for example).

    How to diagnose the issue

    In this type of scenario, you may see an error that looks like the following in the verbose log file for the .NET Framework hotfix (the exact file name in the error message will vary depending on what hotfix you are installing and what files are hard-locked):

    07/01/10 11:30:00 DDSet_Error: Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll' because of system error: The process cannot access the file because it is being used by another process.

    07/01/10 11:30:00 DDSet_Error: Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll' because of system error: Access is denied.

    If any files are removed from the GAC during the failing .NET Framework hotfix installation, the .NET Framework setup verification tool will report that one or more files is missing from your system.

    How to resolve the issue

    If you encounter this error, you can resolve it by doing the following:

    1. Repair or uninstall + re-install the .NET Framework (using these steps if necessary)
    2. Make sure that any .NET Framework files are no longer in use by using the steps in this knowledge base article
    3. Attempt to install the .NET Framework hotfix again
  • Aaron Stebner's WebLog

    Installing offline documentation for Windows Phone Developer Tools

    • 4 Comments

    The Windows Phone Developer Tools CTPs and Beta have only offered online documentation for general Windows Phone developer topics and Silverlight Windows Phone application development topics.  However, it is possible to use the Visual Studio 2010 Help Library Manager to download an offline copy of the Windows Phone developer documentation.  Here are the steps I’ve used to do this on my computer:

    1. Launch Help Library Manager.  To do this, open Visual Studio 2010 or Windows Phone Developer Tools, click on the Help menu and choose Manage Help Settings.
    2. If you have never run Help Library Manager before, you will have to first select a local path to download the content to.  This dialog looks like the following:

      Help Library Manager local content location
    3. After selecting a local path, the main Help Library Manager page will appear.  Click on the link named Install content from online.  This dialog looks like the following:

      Help Library Manager main page
    4. In the list of online content, scroll to the bottom, locate the item named Windows Phone Development and click the Add link.  This dialog looks like the following:

      Help Library Manager install from online
    5. If you would like, you can also use the Help Library Manager to install offline content for other technologies like the .NET Framework, the Windows SDK, etc.

    XNA Game Studio 4.0, which is installed as a part of the Windows Phone Developer Tools setup process, installs a CHM file with offline documentation, but the CHM file can only be launched via the shortcut on the Windows start menu (located at All Programs | Microsoft XNA Game Studio 4.0 | XNA Game Studio Documentation).  The CHM cannot by pressing F1 while working on an XNA Game Studio project in the Visual Studio IDE.

    We are planning to make the XNA Game Studio 4.0 documentation available for offline download via the Help Library Manager in the future.  Once we do that, you will be able to download and install the documentation in the same way that I described above for the Windows Phone Development documentation.  After installing the offline documentation using Help Library Manager, you will be able to access the documentation by pressing F1 while working on an XNA Game Studio project in the Visual Studio IDE.

    <update date="7/30/2010"> Updated the first step in this post with an easier way to launch Help Library Manager. </update>

     

  • Aaron Stebner's WebLog

    Possible issues uninstalling the Windows Phone Developer Tools CTP Refresh and installing the RTW version

    • 9 Comments

    Note - I originally wrote this blog post when the Windows Phone Developer Tools Beta was released, but the information is also useful when trying to install the RTW version.  I'm going to update some of the links from this post to point to the WPDT RTW version instead of the beta version.

    As noted in my previous blog post, the Windows Phone Developer Tools RTW was released recently.  Since the RTW version was released, we’ve heard from some people who have had problems uninstalling the previous WPDT CTP builds from their computer in order to be able to install the RTW version.  There are 2 specific types of issues that I’ve seen, so I want to describe each of them in a bit more detail in case anyone reading my blog in the future runs into similar problems.

    Issue 1 – WPDT CTP uninstall will not proceed due to missing components

    In this scenario, the WPDT CTP or CTP Refresh uninstall process detects that some optional components (Silverlight 4 Tools, XNA Game Studio 4.0 and/or XNA Game Studio 4.0 Windows Phone Extensions) are not present, and it forces you to re-install those components before being allowed to uninstall the WPDT CTP.

    In most cases, you can simply allow setup to re-download and re-install the missing components, then run setup again and uninstall the CTP.  The steps to accomplish this are documented in this blog post.  This post describes CTP uninstall, but equivalent steps can be used for CTP Refresh uninstall as well.

    Sometimes, the re-download and re-install of these components can also fail.  If you encounter this type of failure, you can download the XNA Game Studio cleanup tool and choose the option in that tool to uninstall the Windows Phone Developer Tools as a last resort.  After the uninstall completes, you can proceed with the installation of the WPDT RTW.

    Note – the underlying problem with WPDT setup that causes it to force you to re-install components in order to uninstall the product is a known bug that existed in the CTP and CTP Refresh and has been fixed in the Beta and in the RTW version.  However, since the bug was present in the CTP Refresh, it still impacts scenarios where you try to uninstall the CTP Refresh in order to move forward to RTW.  You should not see this type of issue when uninstalling the Beta or RTW versions of WPDT.

    Issue 2 – WPDT RTW install will not proceed because of incompatible components

    In this scenario, the WPDT RTW setup process blocks you from installing because it detects that incompatible components are still installed on your computer.  In some cases, this can happen even after uninstalling the CTP builds as described above in Issue 1.

    I use the steps like the following to diagnose and resolve this issue:

    1. Open the file %temp%\dd_install_vm_xcor_100.txt and determine the exact components that WPDT setup has identified as incompatible.  The incompatible products will generate log file entries like the following:

      [07/12/10,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Error: CVSScenario::ExecuteEachBlocker returned false
      [07/12/10,10:49:40] Setup.exe: AddGlobalCustomProperty
      [07/12/10,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Error:There is a blocking condition met, the installer is blocking because of Section :
      [07/12/10,10:49:40] Setup.exe: AddGlobalCustomProperty
      [07/12/10,10:49:40] VS Scenario: ***ERRORLOG EVENT*** : Microsoft Visual C# Express 2010
    2. Look in the WPDT setup data file named blocker.sdb to determine the exact registry key that is being used to detect each incompatible product.  Blocker.sdb is located in the vm_web.exe self-extracting setup package, and I have posted an extracted copy at this location.  For the product in the above example, the information in blocker.sdb looks like the following:

      [Microsoft Visual C# Express 2010]
      VersionCheck=RegVerBuildCheck
      DetectKey=HKLM,SOFTWARE\Microsoft\DevDiv\vcs\Servicing\10.0\xcor
      DetectKeyVal=Version
      DetectKeyValData=30319.01

      This means that setup will block if the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vcs\Servicing\10.0\xcor@Version exists and the value is less than 30319.01.

      There is one subtle issue here - the WPDT setup is a 32-bit application, so that means that the registry location will be different on a 64-bit version of Windows.  In the example above, the registry key will be at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vcs\Servicing\10.0\xcor@Version.
    3. Use the Programs and Features control panel to uninstall the product that is triggering the block.  In some cases, uninstalling the product will not remove the registry key that WPDT setup is checking for in blocker.sdb.  In those cases, you may have to manually rename or change the registry value so that the block will no longer be triggered.

    If you run into WPDT CTP uninstall issues or RTW install issues that are not solved by the above suggestions, 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 or in a comment on my blog to get additional support.

    <update date="7/13/2010"> Updated the link for uninstall steps to point at a new CTP Refresh-specific blog post instead of the old MIX CTP blog post. </update>

     <update date="7/14/2010"> Added a note about where to find the blocking registry keys on 64-bit versions of Windows. </update>

     <update date="10/14/2010"> Updated the post to refer to WPDT RTW instead of the WPDT beta. </update>

     

  • Aaron Stebner's WebLog

    Windows Phone Developer Tools Beta and XNA Game Studio 4.0 Beta now available for download

    • 24 Comments

    As announced on the Windows Phone Developer Blog, a Windows Phone Developer Tools (WPDT) Beta (which includes an XNA Game Studio 4.0 Beta as well) was released for download today.

    Getting Started links

    Here are links to help you get started installing and using the Windows Phone Developer Tools Beta:

    Documentation links

    Here are some links to useful documentation to help you get started with the Windows Phone Developer Tools Beta:

    Support links

    Here are some links if you run into questions or issues with the Windows Phone Developer Tools Beta:

    How to install

    Here are steps you can use to install the Windows Phone Developer Tools Beta:

    1. If you have either of the previous Windows Phone Developer Tools CTPs 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.  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 the WPDT Beta.
    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 the WPDT Beta.  If you install them after the WPDT Beta, you will be prompted to download and install a Silverlight update when trying to use them.
    4. After removing previous WPDT CTPs 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 the WPDT Beta.

    If you encounter Windows Phone Developer Tools Beta setup failures

    If you run into an installation or uninstallation failure for the Windows Phone Developer Tools Beta, 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 cleanup tool described at http://blogs.msdn.com/astebner/pages/9544320.aspx to remove XNA Game Studio or the Windows Phone Developer Tools.

  • Aaron Stebner's WebLog

    Link to a survey about the .NET Framework 4 setup and deployment experience

    • 2 Comments

    Peter Marcu has posted a new survey on his blog that I wanted to link to here in order to try to help him get more responses.  He's looking for feedback about changes made to the setup and deployment experience for the .NET Framework 4 to help determine how to continue to improve the experience in future versions of the .NET Framework.

    If you are a developer working on the deployment of applications that require the .NET Framework, I encourage you to check out his blog post at http://blogs.msdn.com/b/pmarcu/archive/2010/07/16/do-you-deploy-a-managed-app-part-2.aspx and post comments there or send him an email to share your experiences and suggestions for improvements.

Page 1 of 1 (5 items)