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.

 

  • its works properly. i have try it. nice

  • i have try it and its works properly. nice trick to remove manualy

    vs-2005.

    thanks to all team mambers of this websites.

  • I'm install .netframe work 2.0

    but it error 25007.

    i try to every thing on the top but him say error 25007

    plzz Help me

    thank you

  • Hi Tenjoteng - I'd suggest using the steps and the cleanup tool listed at blogs.msdn.com/.../8108332.aspx to fully remove the .NET Framework from your computer, then try to re-install the .NET Framework 3.5 SP1 (which will also install the .NET Framework 2.0 SP2 and 3.0 SP2 for you behind the scenes).

  • Hi, Trying to install .NET Framework 2.0 and I keep getting the following:

    [11/05/12,12:01:40] Microsoft .NET Framework 2.0a: [2] Error: Installation failed for component Microsoft .NET Framework 2.0a. MSI returned error code 1603

    [11/05/12,12:01:46] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a is not installed.

    Can you help or point me in the right direction. Thanks!

  • Hi Moondragon - Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%\vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?

  • Hi Aaron,

    I have the same problem as moondragon. I tried all the steps You mentioned before.

    I made setup log files. Could you please help me?

    blogs.msdn.com/.../408856.aspx

    Thanks in advance!

  • Hi Zhartai - Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%\vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?

  • Sorry, im a bit sleepy, i added wrong link.

    Here is the correct link.

    skydrive.live.com/redir

  • Hi Zhartai - This is the error that is causing the .NET Framework to fail to install on your computer:

    MSI (s) (98:1C) [04:49:12:187]: Internal Exception during install operation: 0xc0000005 at 0x000006427EE83C3F.

    This error code means access is denied.  It might help to try to reset your file/folder/registry permissions by using steps like the ones at blogs.msdn.com/.../solving-setup-errors-by-using-the-subinacl-tool-to-repair-file-and-registry-permissions.aspx.

    If that doesn't help, then it might also help to repair Windows Installer 4.5 using the installer at www.microsoft.com/.../details.aspx.

  • Brilliant!  Worked for me.  Thank you.

  • Manually delete finally succeeded,Good Post!

  • 9 years after the post, still thanks!!!!! ;)

  • Aaron I love you man.

    After 2 days messing with a fubar .net 2.0 install where the repair tool failed to even attempt to fix it and the removal tool said no .net install found.  I have got the old .net 2 out, fresh .net 2 loaded and its doing 3.5 as I type.

    Thanks for all your work

Page 9 of 9 (134 items) «56789
Leave a Comment
  • Please add 3 and 7 and type the answer here:
  • Post