Aaron Stebner's WebLog

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

How to manually cleanup a failed .NET Framework 2.0 install

How to manually cleanup a failed .NET Framework 2.0 install

Rate This

In response to the blog article I posted last week where I provided a link to a .NET Framework manual cleanup tool, I got some questions about whether or not a comparable version is available for cleaning up the .NET Framework 2.0.  I am currently working on a couple of small work items in the code for the tool to enable it to work with 2.0, but in the meantime I wanted to post some manual steps.  I know there have been a lot of uninstall/reinstall issues because we have released an alpha, a beta and numerous Community Tech Preview (CTP) versions and not all of them will uninstall completely cleanly in order to allow a future beta version of 2.0 to install correctly.

 

The following steps will help resolve .NET Framework 2.0 installation failures/hangs in most cases. Before proceeding please note these important caveats:

  • These steps will only work for the .NET Framework 2.0 installed by dotnetfx.exe (the MSI-based setup).  There is a version of .NET Framework 2.0 that is installed as part of the OS if you are running any pre-release builds of Windows codename Longhorn.  You should not use these steps on Longhorn.
  • These steps will damage the .NET Framework 1.0 or 1.1 if you have either of these versions installed on your computer.  This is because you are instructed to rename the file mscoree.dll that is shared by all versions of the .NET Framework.   If you have 1.0 or 1.1 installed, you will need to immediately install a later build of .NET Framework 2.0 to update mscoree.dll or perform a repair of the .NET Framework 1.0 or 1.1.  To repair .NET Framework 1.0 or 1.1, go to the Add or Remove Programs control panel, click on the link for support information, and then click on the Readme link.
  • If you are running Windows Server 2003, Windows XP Media Center Edition or Windows XP Tablet PC Edition, there is a version of the .NET Framework that ships as part of the OS.  In those situations, you cannot repair by using the instructions in Add or Remove Programs under the readme link.  In those scenarios it is strongly recommended that you immediately install .NET Framework 2.0 to provide an updated version of mscoree.dll.  If that is not an option, you must repair your OS to fix the issue.

Steps to clean up a machine to fix a failed .NET Framework 2.0 installation:

  • Using Add or Remove Programs, locate any versions of the .NET Framework 1.2 or 2.0 and choose Remove to uninstall them
  • Using regedit, navigate to HKLM\Software\Microsoft\.NETFramework and delete any keys and values that have 1.2 or 2.0 in it, including keys/values that are in subkeys underneath .NETFramework.
  • Using regedit, navigate to the sub-hive HKLM\Software\Microsoft\.NETFramework\Policy and delete any key or value that has 1.2 or 2.0 in it. 
  • Using regedit, navigate to HKLM\Software\Microsoft\ASP.NET and delete any key or value that has 1.2 or 2.0 in it, including keys/values that are in subkeys underneath ASP.NET. 
  •  Right-click on My Computer and choose Manage. Expand Computer Management (Local), then Local Users and Groups, then click on the Users folder. In the right-hand pane, right-click on the ASPNET user account and choose Delete to remove it.
  •  Go to %windir%\assembly and delete anything with *1.2* or *2.0* in the folder name. Delete the GAC_32 and GAC_MSIL folders as well.

    You can not view the contents of %windir%\assembly in Windows Explorer when the .NET Framework is installed.  In order to view the contents, you will need to set the following registry value and reopen Windows Explorer

    Key name:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
    Value name: DisableCacheViewer
    Data type: REG_DWORD
    Value data: 1

    Note: You should remove the DisableCacheViewer value after you complete this step because this is only used for debugging purposes.

  • Go to %windir%\Microsoft.NET\Framework and delete any folders named v1.2.* or v2.0.* along with all of the files and subfolders they contain.  You may get errors when trying to delete some of the files because they are in use.  In most cases, rebooting the machine and trying again will work.  If not, you can rename the files to be <filename>.old and then delete them after a future reboot.
  •  Rename %windir%\system32\mscoree.dll to mscoree.dll.old.
  •  After doing all of this, try to install the previously failing version of the .NET Framework 2.0.

If you have any trouble getting these steps to work correctly please let me know.  Also stay tuned for a future post once I get the cleanup tool updated to work with .NET Framework 2.0 and post it for download.

 

  • When I try to reinstall .Net 2.0 Beta 2 framework (running dotnetfx.exe), I have selected both Repair and Uninstall. When I click next, the installer says "Initializing Install" ... then it blows up. Below is the installer fail info. Thanks for any help.


    - I followed manual steps and retried.. no success.

    - I ran both cleaner tools posted... no success.




    ======================
    MSI CA LOG ENTRY INFO:
    ======================


    CA NAME:


    ======================
    LAST 100 LINES INFO :
    ======================

    === Verbose logging started: 6/13/2005 19:54:46 Build type: SHIP UNICODE 3.00.3790.2538 Calling process: C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\Install.exe ===
    MSI (c) (6C:50) [19:54:46:639]: Resetting cached policy values
    MSI (c) (6C:50) [19:54:46:639]: Machine policy value 'Debug' is 0
    MSI (c) (6C:50) [19:54:46:639]: ******* RunEngine:
    ******* Product: C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi
    ******* Action:
    ******* CommandLine: **********
    MSI (c) (6C:50) [19:54:46:639]: Client-side and UI is none or basic: Running entire install on the server.
    MSI (c) (6C:50) [19:54:46:639]: Grabbed execution mutex.
    MSI (c) (6C:50) [19:54:46:659]: Cloaking enabled.
    MSI (c) (6C:50) [19:54:46:659]: Attempting to enable all disabled priveleges before calling Install on Server
    MSI (c) (6C:50) [19:54:46:659]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (54:0C) [19:54:46:679]: Grabbed execution mutex.
    MSI (s) (54:04) [19:54:46:689]: Resetting cached policy values
    MSI (s) (54:04) [19:54:46:689]: Machine policy value 'Debug' is 0
    MSI (s) (54:04) [19:54:46:689]: ******* RunEngine:
    ******* Product: C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi
    ******* Action:
    ******* CommandLine: **********
    MSI (s) (54:04) [19:54:46:689]: Machine policy value 'DisableUserInstalls' is 0
    MSI (s) (54:04) [19:54:46:699]: File will have security applied from OpCode.
    MSI (s) (54:04) [19:54:47:760]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi' against software restriction policy
    MSI (s) (54:04) [19:54:47:760]: Note: 1: 2262 2: DigitalSignature 3: -2147287038
    MSI (s) (54:04) [19:54:47:760]: SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi is not digitally signed
    MSI (s) (54:04) [19:54:47:770]: SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi is permitted to run at the 'unrestricted' authorization level.
    MSI (s) (54:04) [19:54:47:770]: End dialog not enabled
    MSI (s) (54:04) [19:54:47:770]: Original package ==> C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP\netfx.msi
    MSI (s) (54:04) [19:54:47:770]: Package we're running from ==> C:\WINDOWS\Installer\318bd7.msi
    MSI (s) (54:04) [19:54:47:810]: APPCOMPAT: looking for appcompat database entry with ProductCode '{7A1ADD0C-17F3-47B8-B033-A06E189C835D}'.
    MSI (s) (54:04) [19:54:47:810]: APPCOMPAT: no matching ProductCode found in database.
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'DisablePatch' is 0
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'AllowLockdownPatch' is 0
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'DisableLUAPatching' is 0
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'DisableFlyWeightPatching' is 0
    MSI (s) (54:04) [19:54:47:820]: APPCOMPAT: looking for appcompat database entry with ProductCode '{7A1ADD0C-17F3-47B8-B033-A06E189C835D}'.
    MSI (s) (54:04) [19:54:47:820]: APPCOMPAT: no matching ProductCode found in database.
    MSI (s) (54:04) [19:54:47:820]: Transforms are not secure.
    MSI (s) (54:04) [19:54:47:820]: Note: 1: 2205 2: 3: Control
    MSI (s) (54:04) [19:54:47:820]: Command Line: USING_EXUIH=1 REBOOT=ReallySuppress FILESINUSETEXT= REINSTALL=ALL REINSTALLMODE=emusc CURRENTDIRECTORY=C:\DOCUME~1\a379190\LOCALS~1\Temp\IXP000.TMP CLIENTUILEVEL=3 CLIENTPROCESSID=3436
    MSI (s) (54:04) [19:54:47:820]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{0325D29B-24C8-4E9E-8531-A6D746FB74ED}'.
    MSI (s) (54:04) [19:54:47:820]: Product Code passed to Engine.Initialize: ''
    MSI (s) (54:04) [19:54:47:820]: Product Code from property table before transforms: '{7A1ADD0C-17F3-47B8-B033-A06E189C835D}'
    MSI (s) (54:04) [19:54:47:820]: Product Code from property table after transforms: '{7A1ADD0C-17F3-47B8-B033-A06E189C835D}'
    MSI (s) (54:04) [19:54:47:820]: Product registered: entering maintenance mode
    MSI (s) (54:04) [19:54:47:820]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'.
    MSI (s) (54:04) [19:54:47:820]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.
    MSI (s) (54:04) [19:54:47:820]: Entering CMsiConfigurationManager::SetLastUsedSource.
    MSI (s) (54:04) [19:54:47:820]: Specifed source is already in a list.
    MSI (s) (54:04) [19:54:47:820]: User policy value 'SearchOrder' is 'nmu'
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'DisableBrowse' is 0
    MSI (s) (54:04) [19:54:47:820]: Machine policy value 'AllowLockdownBrowse' is 0
    MSI (s) (54:04) [19:54:47:820]: Adding new sources is allowed.
    MSI (s) (54:04) [19:54:47:820]: PROPERTY CHANGE: Adding PackagecodeChanging property. Its value is '1'.
    MSI (s) (54:04) [19:54:47:820]: Note: 1: 1729
    MSI (s) (54:04) [19:54:47:820]: Note: 1: 2729
    MSI (s) (54:04) [19:54:47:820]: Note: 1: 2729
    MSI (s) (54:04) [19:54:47:830]: Product: Microsoft .NET Framework 2.0 Beta 2 -- Configuration failed.

    MSI (s) (54:04) [19:54:47:840]: MainEngineThread is returning 1638
    Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
    {7A1ADD0C-17F3-47B8-B033-A06E189C835D}
    MSI (c) (6C:50) [19:54:47:850]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
    MSI (c) (6C:50) [19:54:47:850]: MainEngineThread is returning 1638
    === Verbose logging stopped: 6/13/2005 19:54:47 ===
  • Hi Ian,

    This log file is showing that Windows Installer thinks that you already have the .NET Framework 2.0 beta 2 installed. Can you try to run msiexec /x {7A1ADD0C-17F3-47B8-B033-A06E189C835D} to remove beta 2, and then try to run setup again and see if it works for you? If that doesn't work, please try the following:

    1. Download the version of the cleanup tool at http://astebner.sts.winisp.net/Tools/dotnetfx_cleanup_tool.zip

    2. Run cleanup_tool.exe /t:c:\temp /c

    3. Go to c:\temp and run msizap.exe TP {7A1ADD0C-17F3-47B8-B033-A06E189C835D}

    4. Try to run .NET Framework 2.0 beta 2 setup again

    Please let me know if this works for you....
  • Hi Aaron,
    Thanks for all your excellent advice. We've followed all of the steps you've outlined and still have not been able to successfully install, so I'm hoping you can give us some ideas.

    Our situation _seems_ like it might be slightly different from others, but I'll do my best to outline what we're experiencing and if you have any questions or need more detail, please let me know:

    --Each time we attempt an install, it appears to run fine through these basic steps: Extract, EULA, Configuring Install, Write System Reg Entries, Copying New Files, Binding Executables, Write System Reg Values. At this point, the progress message changes to "Rolling Back. . . " and the detail says "Unregistering SystemEnterpriseServices.dll" and then throws a rather generic error--"An error occurred during setup.
    The following error occurred during setup: Installation Failed."

    --We are attempting to load the Beta 2.0 .NET Framework on a test machine that was built to mirror our production server as closely as possible, which has the .NET v1.2 installed. The Framework is being installed from dotnetfx.exe, and we are using Windows Installer 3.1

    --The issue has occurred consistently on our Win2K test server, although it installed fine on a similar machine running Win2K3. We first tried running the vs2005_beta_cleanup_tool.exe as recommended on the Microsoft MSDN Site, and then following your manual instructions in this post--neither of which changed the sypmtoms or outcome.

    I apologize for being so verbose, but I'm hoping there is some clue you'll see that we've overlooked. Please let me know if you have any suggestions or questions.

    Thanks!

    Steve
  • Hi Steve - could you please look in your %temp% directory for the most recent file named dd_netfx20msi*.txt and zip and send that file to me via email? That will help us figure out which part of setup is failing and causing the rollback to happen.
  • My install/uninstall is quite FUBARed. I tried the manual uninstall, and automated uninstall, the brute force uninstall. It will not uninstall. Before I tried any of the manual or brute force, i was getting error 2203.

    Any ideas?

    David
  • Hi David - could you please look in your %temp% directory for the most recent file named dd_netfx20msi*.txt and zip and send that file to me via email at aaronste (at) microsoft (dot) com? Error 2203 means "Database: [2]. Cannot open database file. System error [3]" but hopefully the log file will give me more context on what could be causing this error.

  • I am trying to install July CTP of VS 2005. It fails because .Net 2.0 Beta is install. All attempts to unistall .Net 2.0 Beta fail because netfx.msi file is missing. VS 2005 Cleanup utility fails because netfx.msi file is missing. The .Net Framework 2.0 Beta Cleanup tool completes without error but .Net 2.0 Beta is STILL installed after it runs and the system is rebooted. .Net 1.0 and 1.1 were removed but not 2.0 Beta. How do I unistall .Net 2.0 Beta?
  • Hi Don - can you please try to install the Windows Installer Cleanup Utility from http://support.microsoft.com/default.aspx?scid=kb;en-us;290301 and use that to locate and remove the .NET Framework 2.0 beta? I am working on a version of the cleanup tool that will work with VS 2005 beta 2 and I will fix the issue you are running into if the original MSI is missing as part of that release. In the meantime the Windows Installer Cleanup Utility should allow you to fix this bug.

  • We are having exactly the same problem as Steve Schamber will the roll back... have there been any more details on this... I have uploaded my log files to http://www.trilliumd.co.uk/dotnet2b2log.zip if these are use.

    tia
  • I improperly uninstalled both .NET framework 2 and visual studio express C# I've deleted everything in sight related to it in the registry files, renamed a few to delete them, restarted several times. And still when I try to install it again I get this error - The Windows Installer package: C:\Documents and Settings\User\Local Settings\Temp\SIT20876.tmp\vs_setup.ms_ could not be opened.

    I need to finish up some work from school so I need help as soon as possible.
    Thanks in advance,
    Travis
  • Update - used the microsoft clean up install utility or whatever its called..anyway cleaned up .net 2.0 and C# and now I get to the downloading then installing part and I get several errors...
  • Hi Raveresque - I looked at your log file and it does appear to be the same issue as Steve was seeing. Unfortunately, I was not ever able to determine the root cause of Steve's issue before he needed to reformat the machine and start over. I am asking around to see if there have been any other solutions found yet because I have heard of several customers who have reported this issue at http://lab.msdn.microsoft.com/productfeedback/. I will let you know what I am able to find...


    Hi Word - could you give me more detail about the errors that you see while installing C# Express? If possible, could you zip and attach dd_*.txt from your %temp% directory so I could see the exact error messages you are getting? You can send them to aaronste (at) microsoft (dot) com.
  • Hi Raveresque - we have a potential fix for the issue that you reported, but since we have been unable to reproduce it in our test lab, we are not sure if it will work or not. Would you be willing to try out an updated version of .NET Framework setup to see if it fixes this issue on your machine? If so, you can download it from http://astebner.sts.winisp.net/Tools/netfx.zip, extract the contents and run install.exe from within that package.

    Please contact me at aaronste (at) microsoft (dot) com if you try this and let me know whether or not it resolves the issue on your machine.
  • I installed some audio drivers for some odd reason and ended up having to do a system restore ( dont ask ) which undid all of my random .net framework visual studio registry deletings so I ended up with a new error Involving an HRESULT thinger. I then proceeded to another solution written by you deleting a registry value to make .net framework beta 2 reinstall and it fixed that problem as well as another one I was having before all this mess started.

    Thanks alot!
    Travis
  • Hi Raveresque - I still haven't heard back from you and I don't have a way to contact you, but I wanted to let you know that I have posted an additional blog item about the problem you are seeing. You can read it at http://blogs.msdn.com/astebner/archive/2005/08/09/449720.aspx. If you happen to read this and are still having the problem, I would really like if you could contact me via email at aaronste (at) microsoft (dot) com before using the steps in my new blog post. I want to see if the buddy build of the .NET Framework I posted at http://astebner.sts.winisp.net/Tools/netfx.zip will resolve your issue and help you avoid needing to try that other workaround.

    Thanks in advance!
Page 2 of 10 (136 items) 12345»
Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post