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.
Last week, I posted a set of command line parameters that can be used to repair or uninstall the .NET Framework 2.0 SP2 and 3.0 SP2. When I was working on that blog post, I noticed a behavior change that is new in 2.0 SP2 setup and 3.0 SP2 setup that affects the repair scenarios for these products on Windows XP and Windows Server 2003, so I wanted to describe the issue and how to work around it.
Description of the issue
There was a change made in the MSI-based installers for the .NET Framework 2.0 SP2 and 3.0 SP2 that causes the default repair that happens when you use the Add/Remove Programs entry for these products to not actually repair anything. For example, if you end up with an out-of-date version of c:\windows\system32\mscoree.dll or if any of the files or registry values in the .NET Framework 2.0 SP2 or 3.0 SP2 are missing entirely, the repair from Add/Remove Programs will not restore the files or registry keys.
Because this issue only affects the MSI-based installers for 2.0 SP2 and 3.0 SP2, you will only encounter this issue on Windows XP and Windows Server 2003. On Windows Vista and Windows Server 2008, the .NET Framework 2.0 SP2 and 3.0 SP2 are installed as OS update packages instead of as MSIs.
How to work around the issue
If you need to repair the MSI-based version of the .NET Framework 2.0 SP2 or 3.0 SP2 on Windows XP or Windows Server 2003, you must run the following command lines instead of using the repair option from Add/Remove Programs:
.NET Framework 2.0 SP2 - silent repair
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qb
.NET Framework 3.0 SP2 - silent repair
msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL /l*v %temp%\netfx30sp2_repair_log.txt /qb
Behind-the-scenes details if you are interested
There is a difference in the command line switches being passed in to trigger the repair of 2.0 SP2 and 3.0 SP2 compared to 2.0 SP1 and 3.0 SP1. Here are a couple of specific examples:
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qn
.NET Framework 2.0 SP1 - silent repair
msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} /l*v %temp%\netfx20sp1_repair_log.txt /qn
The reason that these command lines need to be different (aside from the product codes changing between SP1 and SP2) is that the REINSTALL=ALL property no longer gets set by default in the MSI-based .NET Framework 2.0 SP2 or 3.0 SP2 repair processes. There is a custom action in .NET Framework 2.0 SP1, 2.0 SP2, 3.0 SP1 and 3.0 SP2 setup that sets the REINSTALL=ALL property during repair scenarios. However, the condition for that custom action was changed in 2.0 SP2 and 3.0 SP2 setup such that it will never evaluate to true, and the REINSTALL=ALL property no longer gets automatically set. As a result, you have to manually pass in the REINSTALL=ALL property in order to perform a full repair of the .NET Framework 2.0 SP2 and 3.0 SP2.
A while back, I wrote a blog post about how to perform silent repairs and uninstalls for the .NET Framework 2.0 SP1 and 3.0 SP1. When the .NET Framework 3.5 SP1was released last fall, it included the .NET Framework 2.0 SP2 and 3.0 SP2 behind the scenes as prerequisites. Those packages are both slipstream updates for the 2.0 SP1 and 3.0 SP1 versions, and because of that, the command lines used to repair or uninstall them have changed.
The following list provides example command lines that can be used to repair and uninstall the MSI-based .NET Framework 2.0 SP2 and 3.0 SP2 packages after they have been installed on the system:
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL REBOOT=ReallySuppress /l*v %temp%\netfx20sp2_repair_log.txt /qn
.NET Framework 2.0 SP2 - silent uninstall
msiexec /x {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REBOOT=ReallySuppress /l*v %temp%\netfx20sp2_uninstall_log.txt /qn
msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL REBOOT=ReallySuppress /l*v %temp%\netfx30sp2_repair_log.txt /qn
.NET Framework 3.0 SP2 - silent uninstall
msiexec /x {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REBOOT=ReallySuppress /l*v %temp%\netfx30sp2_uninstall_log.txt /qn
Important notes:
<update date="1/11/2012"> Added the REBOOT=ReallySuppress property to each command line so that the computer will not automatically reboot when running these command lines if the repair or uninstall process requires a reboot. </update>
Over the weekend, I posted an updated version of the .NET Framework setup verification tool that contains a few behavior changes that I wanted to describe here. I have also updated the .NET Framework Setup Verification Tool User's Guide to reflect these changes, and you can find additional information and download links there as well.
A while back, I posted some instructions that can be used to create an administrative install point for the .NET Framework 2.0 SP1. Since then, the .NET Framework 2.0 SP2 has been released (it is required in order to install the .NET Framework 3.5 SP1). Here are some updated steps that can be used to create an administrative install point for the .NET Framework 2.0 SP2 for each of the supported processor architectures.
To create an administrative install point for the .NET Framework 2.0 SP2 x86:
With these steps, you will have an administrative install point for the .NET Framework 2.0 SP2 x86 located at c:\netfx20sp2\x86\AIP. You can then install the MSI directly using a command line like the following:
msiexec.exe /i c:\netfx20sp2\x86\AIP\netfx20a_x86.msi /l*v %temp%\netfx20sp2x86log.txt /qb VSEXTUI=1
You can adjust the parameters as needed if you want a fully silent install instead of basic UI, or want to use any other standard Windows Installer command line parameters.
To create an administrative install point for the .NET Framework 2.0 SP2 x64:
With these steps, you will have an administrative install point for the .NET Framework 2.0 SP2 x64 located at c:\netfx20sp2\x64\AIP. You can then install the MSI directly using a command line like the following:
msiexec.exe /i c:\netfx20sp2\x64\AIP\netfx20a_x64.msi /l*v %temp%\netfx20sp2x64log.txt /qb VSEXTUI=1
To create an administrative install point for the .NET Framework 2.0 SP2 ia64:
With these steps, you will have an administrative install point for the .NET Framework 2.0 SP2 ia64 located at c:\netfx20sp2\ia64\AIP. You can then install the MSI directly using a command line like the following:
msiexec.exe /i c:\netfx20sp2\ia64\AIP\netfx20a_ia64.msi /l*v %temp%\netfx20sp2ia64log.txt /qb VSEXTUI=1
I just noticed this item on Charlie Owen's blog and wanted to post it here as well. There is now a public download available for the Windows Media Center SDK for the Windows 7 beta. Here are some useful links:
A while back, I posted some instructions that can be used to create an administrative install point for the .NET Framework 3.0 SP1. Since then, the .NET Framework 3.0 SP2 has been released (it is required in order to install the .NET Framework 3.5 SP1). Here are some updated steps that can be used to create an administrative install point for the .NET Framework 3.0 SP2 for each of the supported processor architectures.
Please keep in mind that there are several prerequisites that must be installed prior to attempting to deploy the .NET Framework 3.0 SP2 from an administrative install point. These include the .NET Framework 2.0 SP2, MSXML 6.0, the RGB Rasterizer, the Windows Imaging Component (WIC) and the XML Paper Specification (XPS) shared components. The .NET Framework 2.0 SP2 can be deployed using the steps in this previous blog post, and the other prerequisites can be deployed using the previously documented steps in the .NET Framework 3.0 deployment guide and the .NET Framework 3.5 deployment guide.
To create an administrative install point for the .NET Framework 3.0 SP2 x86:
With these steps, you will have an administrative install point for the .NET Framework 3.0 SP2 x86 located at c:\netfx30sp2\x86AIP. You can then install the MSI directly using a command line like the following:
msiexec.exe /i c:\netfx30sp2\x86\AIP\netfx30a_x86.msi /l*v %temp%\netfx30sp2x86log.txt /qb VSEXTUI=1
To create an administrative install point for the .NET Framework 3.0 SP2 x64:
With these steps, you will have an administrative install point for the .NET Framework 3.0 SP2 x64 located at c:\netfx30sp2\x64\AIP. You can then install the MSI directly using a command line like the following:
msiexec.exe /i c:\netfx30sp2\x64\AIP\netfx30a_x64.msi /l*v %temp%\netfx30sp2x64log.txt /qb VSEXTUI=1
I have heard from a few people who have run into error code 25015 with a data error (cyclic redundancy check) message while trying to install the .NET Framework 2.0, 2.0 SP1 or 2.0 SP2. This error can also occur during .NET Framework 3.0, 3.5 or 3.5 SP1 setup because all of these versions of the .NET Framework will attempt to install the .NET Framework 2.0 behind the scenes.
How to diagnose this error
When this error occurs, the following information appears in a dialog box and/or in the verbose MSI log file (named %temp%\dd_netfx20MSI*.txt for the original release of the .NET Framework 2.0 and %temp%\dd_net_framework20*.txt for the .NET Framework 2.0 SP1 or SP2):
Error 25015.Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Visual Basic.dll' because of system error: Data error (cyclic redundancy check) MSI (s) (A1!B0) [12:34:56:111]: Product: Microsoft .NET Framework 2.0 Service Pack 1 -- Error 25015.Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Visual Basic.dll' because of system error: Data error (cyclic redundancy check).
Error 25015.Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Visual Basic.dll' because of system error: Data error (cyclic redundancy check)
MSI (s) (A1!B0) [12:34:56:111]: Product: Microsoft .NET Framework 2.0 Service Pack 1 -- Error 25015.Failed to install assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Visual Basic.dll' because of system error: Data error (cyclic redundancy check).
Note that the exact file that is listed in these error messages can vary across computers, but typically they will list the same file each time if you re-run setup on the same computer.
How to work around this error
In many of the cases I've seen where this exact data error (cyclic redundancy check) message appears, the root cause ended up being some corrupt sectors on the hard drive. If that is the cause, then it can help to run the Chkdsk tool that ships with Windows to scan the hard drive and repair any corrupt sectors that it finds.
To run Chkdsk and repair corrupt sectors, you can use the following steps:
What to do if the workaround does not help
I want to mention one caveat here that I typically include in all of my .NET Framework troubleshooting blog posts - there are many possible causes for .NET Framework setup failures, and this blog post only describes one of them. The above workaround will likely not help solve all possible installation issues. If this workaround does not help in your scenario, then I suggest looking at the .NET Framework setup troubleshooting guide for links to other possible installation issues and workarounds, links to log file locations, links to readme files, etc.
A while back, I posted a set of steps that you can use to create an MSI with WiX and combine it with a Visual Studio setup.exe bootstrapper to create an installer that can chain prerequisites and then install the MSI. Since then, I've gotten a couple of questions about odd behaviors that customers have observed in the Visual Studio bootstrapper, and I've learned about a couple of issues about that bootstrapper technology and how to work around them that I wanted to describe here.
Issue 1 - problem creating a self-extracting package with the Visual Studio 2008 bootstrapper
If you use Visual Studio 2008 to create a VS bootstrapper package, you will notice that the setup.exe process exits as soon as it launches the install process for your MSI. That typically causes problems if the setup.exe is embedded in a self-extracting package. Because setup.exe exits before the overall installation process is complete, the self-extracting package will try to clean up and exit, and that can end up deleting files that are needed by the MSI that is still in the process of installing.
This behavior is new in bootstrapper packages created with Visual Studio 2008, and the change is designed to allow the bootstrapper to work better with UAC on Windows Vista. There are a couple of options available to you to work around this issue if needed:
Issue 2 - problem displaying download progress for the MSI via the Visual Studio 2008 bootstrapper
If you use Visual Studio 2008 to create a VS bootstrapper package, and you configure the bootstrapper to download your MSI from the Internet (by using the HomeSite value for the ComponentsLocation attribute in the GenerateBootstrapper task), you may not see any progress UI while the MSI is being downloaded. This is a bug in the VS 2008 bootstrapper that is fixed in VS 2008 SP1. To fix this, you can install VS 2008 SP1 and rebuild your setup.exe bootstrapper.
When you rebuild setup.exe, make sure that you use the version of msbuild.exe that is in the .NET Framework 3.5 directory (%windir%\Microsoft.NET\Framework\v3.5\msbuild.exe) and not the copy of msbuild.exe in the .NET Framework 2.0 directory (%windir%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe) or else you will not see the download progress for your MSI, even if you have VS 2008 SP1 installed.
Last week, I posted an item about the release of the XNA Game Studio 3.0 Japanese documentation installer. This package allows you to install a local collection of Japanese help topics for XNA Game Studio 3.0. This documentation is stored on the local file system and can be accessed in the Visual Studio help viewer even if the computer does not have an active Internet connection.
Today, the XNA Game Studio 3.0 Japanese help documentation was also published to the online MSDN library at http://msdn.microsoft.com/ja-jp/library/bb200104.aspx. This enables users to search online for Japanese help topics for XNA Game Studio 3.0. In addition, you can configure Visual Studio 2008 and Visual C# 2008 Express Edition to automatically load the online Japanese help documentation first if it is able to access the Internet. To change the Visual Studio online help language preferences, you can do the following:
These steps will allow you to view Japanese help documentation for XNA Game Studio 3.0 even if you do not download and install the Japanese documentation package, but it does require your computer to have Internet access at the time you try to view help topics. You can also click the check box on the Help item in the Visual Studio options page to cause it to display the English versions of the help topics as well if you choose to.
Last Friday (February 13, 2009), an update for XNA Game Studio Connect was released via Xbox LIVE Marketplace. This update is described in more detail in this post on Michael Klucher's blog. To quickly summarize, some changes were made to allow developers to debug and peer review scenarios that previously were only available after a game had been published to Xbox LIVE Community Games (specifically, the Community Games splash screen and the trial mode expiration screen).
If you are using XNA Game Studio 3.0 for Xbox 360 development and already have XNA Game Studio Connect, you don't need to do anything special to get this update. It will be automatically offered to you the next time you launch XNA Game Studio Connect.
As always, if you have any questions or comments about XNA Game Studio development, please check out the following resources: