Possible issue where .NET Framework 2.0 SP1 setup can fail and corrupt the .NET Framework 2.0
Last week, I started getting a larger than normal volume of emails from customers who ran into problems using applications that require the .NET Framework 2.0 and needed advice about how to get their systems back up and running. After investigating some of these cases and talking to some folks on the .NET Framework technical support team and Heath Stewart, I learned more about what was causing many of these issues. Heath wrote up an in-depth summary of this issue and posted a tool to help repair systems that get into this state in this post on his blog. I want to also briefly summarize the issue here and link to his blog in the hopes of making it easier to find in the future.
Description of the issue
Most of the customers I had talked to had the original version of the .NET Framework 2.0 on their system and then attempted to install the .NET Framework 2.0 SP1 (either by directly downloading it or by having it offered to them on Windows Update). However, the .NET Framework 2.0 SP1 setup failed due to an error encountered while uninstalling the original version of the .NET Framework 2.0. Note - behind the scenes, the .NET Framework 2.0 SP1 attempts to do a major upgrade of the original version of the .NET Framework 2.0.
Unfortunately, there are some issues in the uninstall rollback logic for the .NET Framework 2.0 that cause assemblies to not be put back into the global assembly cache (GAC) if .NET Framework 2.0 uninstall fails. That can leave systems in a state where the .NET Framework 2.0 is partially installed and applications that require the .NET Framework 2.0 will not run correctly. To complicate matters, on a system in this state, the .NET Framework 2.0 cannot be repaired or uninstalled and the .NET Framework 2.0 SP1 cannot be installed.
How to diagnose the issue
Systems that encounter this issue will have the following information in the .NET Framework 2.0 SP1 setup wrapper log file (named %temp%\dd_dotNETFX20error.txt):
[03/25/08,11:11:11] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603
Looking deeper, these systems have the following information in the .NET Framework 2.0 SP1 verbose MSI log file (named %temp%\dd_net_framework20*.txt):
Error 1714.The older version of Microsoft .NET Framework 2.0 Service Pack 1 cannot be removed. Contact your technical support group. System Error 1612.
Windows Installer error 1612 means the following:
The installation source for this product is not available. Verify that the source exists and that you can access it.
How to fix a system that encounters the issue
Once a system encounters this issue, it is necessary to update the Windows Installer information for the .NET Framework 2.0 so it will be put back into a consistent state that will allow you to uninstall the .NET Framework 2.0 and install the .NET Framework 2.0 SP1.
Heath has created a tool named the Microsoft .NET Framework 2.0 Registration Correction Tool (clwireg.exe) that will attempt to surgically repair incorrect Windows Installer registration information for the .NET Framework 2.0 in order to unblock the uninstall process. This tool is available for download via a Microsoft knowledge base article (KB951950). This tool creates a log file named %temp%\dd_clwireg.txt that describes what it is doing to your system in more detail.
Some folks have also contacted me and indicated that they were able to resolve this issue by using the steps in this blog post. In my experience, those steps will also work, but they are much more time-consuming and invasive than the .NET Framework 2.0 registration correction tool, so if you run into an issue like this, I strongly encourage you to try that tool before resorting to these steps that I posted.
Root cause of the issue
On the systems we have looked at so far, one of the following things had occurred:
- The Windows Installer registry information for the .NET Framework 2.0 got into an inconsistent state; the system thinks that one or more hotfixes are installed for the .NET Framework, but the information about the source location of the hotfix is missing from the registry
- The Windows Installer cache (%windir%\Installer) is missing some information about a .NET Framework 2.0 patch that is installed on the system
We have not yet tracked down exactly why this problem happens with such a high frequency. I have heard from some customers who have manually deleted files from the %windir%\Installer directory, but that is not very common and does not explain very many instances I've seen of this problem so far.
We also suspect that some overly aggressive registry and file system cleaner utilities might be causing this on some systems, but we have not yet been able to reproduce that in our test lab. If you encounter this issue and can track it down to a registry or file system utility, then please post a comment on this blog post indicating the name, version and download location of the utility you saw this behavior from so that we can try to talk to the creator of the utility to make sure that they do not remove critical Windows Installer information from systems in future versions of their tools.
Final comments
There are many possible causes for .NET Framework 2.0 SP1 setup failures. If you are encountering a failure but have different information in your log files, you are likely running into a different problem. In those cases, I suggest consulting 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.
<update date="10/1/2008"> Added a link to the knowledge base article for the .NET Framework registration correction tool </update>
Comments
Anonymous
May 01, 2008
Thank you for this article. I also found some of the problems above and so it convinces me to setup just Framework 2.0, not SP1 on my client's computers. I'm currently having an headache from .NET Framework distribution issues. I have a rather simple application, but it comes out that most (80%) of our users do not have the Framework installed! Even worse, many users still have some old Windows 2000 and so they do not even have the Windows Installer 3.0, which is needed for setup of the framework!! So my cute little 2 MB app needs to come with a bloated 25MB setup, which takes forever, and even forces some computers to restart twice (!). Here is my biggest wish to Microsoft: Please can you FORCE the installation of .NET Framework with Microsoft Update. It should not be just an "optional" update. I can really not understand the politics of Microsoft: On one side you are focussing totally on .NET development (which is really great!), but then, the framework cannot be found on many computers. Best regards Georg ScholzAnonymous
June 22, 2008
When authoring deferred custom actions (which are custom actions that change the system state) in anAnonymous
August 05, 2008
The comment has been removedAnonymous
August 05, 2008
Hi Matt - I'm sorry for the hassle that this issue is causing for you. Could you please zip and upload your .NET Framework 2.0 SP1 log files to a file server and then reply back with a link so I can download them and take a look and see if I can figure out what is causing this failure? You can find a list of the log files created during .NET Framework 2.0 SP1 setup at http://blogs.msdn.com/astebner/archive/2008/04/30/8445569.aspx.Anonymous
September 11, 2008
Was there any resolution to Matt's above stated error message? I have a workstation with the same error message that was coming from .NET 2.0 w/ KB928365 installed, removed those items, rebooted, and tried to install .NET 2.0 SP1.Anonymous
September 11, 2008
Hi JesusSegura - There are a lot of different possible causes for .NET Framework 2.0 SP1 install failures, plus I haven't heard back from Matt, so it would be best if you could zip and upload your .NET Framework 2.0 SP1 log files to a file server and then reply back with a link so I can download them and take a look and see if I can figure out what is causing this failure. You can find a list of the log files created during .NET Framework 2.0 SP1 setup at http://blogs.msdn.com/astebner/archive/2008/04/30/8445569.aspx.Anonymous
September 17, 2008
I ended up figuring out what it was. When I tried to reinstall the original .net 2.0 it returned a 1394 error I believe, cannot copy a file. The SP1 install gave me a 1603 in the install log. Once I located the file in question I tried to delete it but received a "data error (cyclical redundancy check)" even from the command prompt trying to force a delete. It turned out the users hard disk had some bad sectors and one of the .net files resided in those sectors and could not be removed in this case. The end solution, new hard drive. If one wants to see the install logs one can <a href="http://jamielynnproperties.com/net2_installer_error.txt">here</a>Anonymous
September 17, 2008
Hi JesusSegura - From your description, it sounds like you were running into a 1304 error from Windows Installer (that is a file copy error). Bad sectors or a failing hard drive are definitely things that could cause this type of error. I'm glad you were able to figure out a solution but I'm sorry for the hassle that this caused.Anonymous
June 28, 2010
Microsoft installer is really a pain! The file-system is a database itself, so why do an installer needs a database? Just to tell a story: If I have a watch I can say what time is it, but if I have two I don't know what time is it. Saw that in MSWord 2K, 2003, 2007 and many other third party products that rely on this badly defined piece od software. Get out of you schools and come back to real world.Anonymous
November 26, 2012
i encountered this problem when installing a 2011 version of xp on an old pentium m laptop when i first installed 4.0 then 1.1 then 2.0 and finally it 'locked up' when i went to put 3.5