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.

 

  • I came across this page while troubleshooting an install of Office 2007 Beta 2 Technical Refresh (B2TR).  I was getting all sorts of errors writing to various assemblies, and ended up unable to either install or uninstall Office.

    I finally figured out the problem.  I had installed Office 2007 B2 with .NET Framework 2.0 installed.  I then ran into a performance problem with ATI's Catalyst Control Panel that required uninstalling .NET Framework 2.0, so I did.  Unfortunately, Office 2007 depended on some assemblies that were now in the unreachable GAC_32 and GAC_MSIL directories!

    I know nothing about .NET, but I manually moved all the files from GAC_32 and GAC_MSIL into GAC, and the Office installer was now happy.

    I'm not even sure which product has the bug.  Office presumably depends on .NET to install assemblies in the right place, and doesn't know the true directories that they're installed in.  But what should happen when that .NET is now an older version?  Quite a messy dependency chain.  I know - I'll let Aaron worry about it.

    Jay
  • Nadav You saved my rear. Your solution solved my problems after hours of research and trial/error. Thanks Mark
  • Details about the .NET Framework 2.0 setup packaging Available command line switches for .NET Framework

  • Help!

    Yes, I installed VB for the first time since I started school. Then I removed it because it took too much space because I was a space freak.

    Anyways, I want to reinstall it again. Now it says that 'vs_setup.ms_' can not be opened.

    I have tried your solution. But, I dont think it was very in-depth so I did not follow.

    Any help would be appreciated..

  • Hi Kevinremiix - The steps in this particular blog post are only applicable to the .NET Framework 2.0, not to VB.  Did you previously uninstall by using the Add/Remove Programs entry for VB Express?  If so, you should be able to download the VB Express package and run it from http://msdn.microsoft.com/vstudio/express/vb/download/.

    If that version of the VB Express installer is giving you this same error, you can try to use manual download and install steps like the ones listed at http://blogs.msdn.com/astebner/articles/551674.aspx.

    Hopefully one of these will help.

  • Where to get Visual Studio 2005 and the .NET Framework 2.0 Where to download the .NET Framework 2.0 redistributable

  • hi aron i got some troubles when installing visual c# express edition i've tried your steps for the failed framework but when i try to open the installed visual c# this happens:

    the beta period is over

    thank you for your participation

    you can now remove microsoft visual c#2005 express edition beta form your computer.

    can you help me?

  • Hi Yeahyeah - It sounds like you had a previous beta of the C# Express Edition that was not fully removed.  I suggest trying the following steps:

    1.  Uninstall C# Express

    2.  Remove the registry values listed at http://blogs.msdn.com/astebner/archive/2005/11/14/492765.aspx

    3.  Remove the registry sub-key named HKEY_CURRENT_USER\Software\Microsoft\VCSExpress

    4.  Try to install Visual C# Express again

    Hopefully this will help.

  • Recently hit this problem (source not available) and .Net 2.0 just went nuts...

    Tried the clean-up tool, no dice.  Wasn't till I manually followed the steps in your post and then ran the Windows Install Clean Up tool (removing the uninstall entries for .net 2.0) that I was finally able to install .net 2.0 again... whew...

    You might want to update the clean up tool to make sure it removes all files/folders (I suspect a running App got in the way - ActiveSync?) and the install/uninstall reg keys.

    Thanks for pointing me in the right direction!

    Later'ish

    Craig

  • Success...Thank You!!!

    Apparently, the latest MS security patch for .NET 2.0 (KB928365) corrupted my .NET install.  I was unable to uninstall the patch or uninstall, reinstall or repair the .NET 2.0 install.  The CleanUp tool worked flawlessly. I was then able to reinstall .NET and apply the patches. Thank you.

  • Hi Aaron,

    I just installed Vista and wanted to install Sql Server 2005 developer. I met the following issue:

    It successfully installed pre-requisite Sql Server native client and Sql server support files of Sql server, when I click next to proceed installation, it pop up error window after that:

    "setup has detected a problem with microsoft .net framework installation and cannot proceed. Microsoft .net framework 2.0"

    But my machine has already installed .net framework 2.0, I double check for it by installing .net framework 2.0. it display the error:

    "The product is already installed as part of the operating system."

    However, in Program and features, .net framework 2.0 is not listed in the currently installed programs… Then I used your clean up tools to try to clean .net framework 2.0. But it didn't list .net 2.0. Then I wondered if I has installed .net 2.0 or not...

    Seems this is a dead lock for me to proceed my installation. I also called Support Center for help, they were not able to offer a solution for this…

    I would appreciate it a lot if anyone here can give a big hand. Thanks in advance!

  • Hi Harryaya - The .NET Framework 2.0 is a part of the OS on Windows Vista, but does not allow you to remove it and therefore does not appear in the Programs and Features control panel.  Also, the cleanup tool does not allow you to remove it because it is an OS component.

    There are steps at http://blogs.msdn.com/astebner/archive/2007/03/26/how-to-repair-the-net-framework-2-0-and-3-0-on-windows-vista.aspx that can be used to repair the .NET Framework 2.0/3.0 files, but I'm not sure if that will help in your scenario or not.  The only other way I know of to repair the .NET Framework on Windows Vista is to repair/re-install Windows Vista itself.

  • Hi Aaron

    I have spent hours trying to install .net 2.0 on to a Windows 2000 workstation.

    The installation gets to approximately 40% complete and just stalls. This happens every time just after the command to disable the cancel button. The onscreen message appears to be writing reg keys to software\microsoft\windows\currentversion\sibebyside\patchedcomponents

    Yet when I have checked the dd_netfx20MSI text file its last command is:

    MSI (s) (6C:FC) [20:17:28:468]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI17.tmp, Entrypoint: QuietExec

    Because I have to forcefully close the install I have used your cleanup tool to successfully remove all versions of .net installed but still have the same problem upon attempting to reinstall.

    I have had trouble finding information on my exact problem and any insight into this would be hugely appreciated.

    Thanks

    Simon

  • Hi Shobman - Can you please make a copy of the dd_netfx20msi*.txt file while setup is stalled at 40% complete on your system, and then zip and send me that entire log so I can take a look to see if I can figure anything out about the root cause of this issue?  You can send the log to Aaron.Stebner (at) microsoft (dot) com.

    Also, in the meantime, it might help to try to use the workaround described at http://blogs.msdn.com/astebner/archive/2006/11/25/disabling-services-with-msconfig-to-work-around-setup-failures.aspx to see if that helps in this scenario.

  • PingBack from http://mikesdump.wordpress.com/2005/04/16/uninstalling-vsnet-2005-pre-beta-2/

Page 6 of 10 (136 items) «45678»
Leave a Comment
  • Please add 1 and 2 and type the answer here:
  • Post