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.

 

  • Now that Visual Studio 2005 and .NET Framework 2.0 beta 2 is about to be available, I wanted to communicate...
  • Thank you for the walk through Aaron! If I come across any other problems I'll post them up here.
  • I know I'm a little late jumping on this particular bandwagon and posting a blog item about it, but just...
  • Hvis du, ligesom jeg,&amp;nbsp;har haft mange forskellige version af Visual Studio 2005 p&#229; din maskine over...
  • Hey all, I'm sorry for the delay posting this.&amp;nbsp; I've got a version of the cleanup tool that I wrote...
  • Worked just great,thanks for that. Next time I'll read the instructions...
  • When I install the vwd 2005 feb ctp, i clicked the" ixpvwd.exe" instead of ' setup.exe' ,

    but during i using it, some err happen ,so i reinstall it by clicking ixpvwd.exe.

    but now when i want to unstall it ,

    it said some pre version installed ,unstall them,

    How can i do it ?

    do you have some tool to remove all the beta 2 feb ctp ?

    Thanks !
  • my email : forwangjun@163.com
    help me !
  • I tried the manual uninstall on Windows Server 2003 and on a client's computer, but the new version still detects the previous version. I can't find any files or registry entries that could trigger this, and I get an error if I try to run the cleanup utility. If you have any suggestions, I would be thankful.
    J
  • Hi J Plumb - Can you please try the following steps and see if this will resolve the issue?

    1. Download the VS 2005 beta cleanup tool from http://go.microsoft.com/fwlink/?linkid=47065 and save it to your desktop

    2. Go to the Start menu, choose Run, type cmd and run vs2005_beta_cleanup_tool.exe /t:c:\temp /c from the cmd prompt

    3. From the cmd prompt, run c:\temp\msizap TP {71F8EFBF-09AF-418D-91F1-52707CDFA274}

    4. Now run c:\temp\cleanup.exe and when the UI lauches, choose to remove the VS 2005 beta again.

    5. After the cleanup completes, try to reinstall VS 2005 Beta 2 one more time.
  • Hi Wangjun - Can you please try the following steps and see if this will resolve the issue?

    1. Download the VS 2005 beta cleanup tool from http://go.microsoft.com/fwlink/?linkid=47065 and save it to your desktop

    2. Go to the Start menu, choose Run, type cmd and run vs2005_beta_cleanup_tool.exe /t:c:\temp /c from the cmd prompt

    3. From the cmd prompt, run c:\temp\msizap TP {F7491330-512C-469D-94F6-4828D2D0344E} to remove the VWD February 2005 CTP.

    4. Now run c:\temp\cleanup.exe and when the UI lauches, choose to remove the VS 2005 beta.

    5. After the cleanup completes, try to reinstall VS 2005 Beta 2 one more time.
  • Quick update on the steps I listed above in the 2 previous comments - I forgot that we removed msizap.exe from the VS 2005 beta version of the cleanup tool to make the download size smaller.

    You can find a copy of msizap.exe inside the version of the cleanup tool designed for .NET Framework 1.0 and 1.1 that is posted at http://astebner.sts.winisp.net/Tools/dotnetfx_cleanup_tool.zip.

    Hope this helps and sorry for any confusion...
  • Beta 2 common install issues and work around can be located at http://lab.msdn.microsoft.com/vs2005/get/vsbeta2installissues/default.aspx...
  • Beta 2 common install issues and work around can be located at http://lab.msdn.microsoft.com/vs2005/get/vsbeta2installissues/default.aspx...
  • If anyone is still having trouble removing components you might want to try the "Windows Installer Clean Up Utility" worked like a charm for me.


    http://download.microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8-983a48d5e1bd/msicuu2.exe
Page 1 of 9 (133 items) 12345»
Leave a Comment
  • Please add 6 and 3 and type the answer here:
  • Post