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.

 

  • Hi Aaron. try with all tools

    - cleanup_tool.exe
    - msicuu2.exe
    - vs2005_beta_cleanup_tool.exe

    When I run VS2K5 installer this continued says
    that:
    Microsoft Windows installer 3.0 and
    Microsoft .NET Framework 2.0 Beta 2 are installed. I don't see any of this product listing in Windows Install Clean Up utility.

    I try running with this issue and receive:

    "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908"

    I apreciate any help.

    -gabriel


  • Hi Gabriel - it sounds like you might be hitting a problem where VS setup thinks the .NET Framework is already installed but in reality it is not. Can you take a look at http://blogs.msdn.com/astebner/archive/2005/06/16/429997.aspx and see if this helps resolve this issue for you? If it does not, please gather up the log files listed at http://blogs.msdn.com/astebner/articles/447012.aspx and zip them and send them to me at aaronste (at) microsoft (dot) com and I will take a look and see what I can figure out.

  • Hi again Raveresque - in case you find my comments here and want to try out the patched .NET Framework beta 2 package, I had to move it to a different location so the previous link is not valid anymore. It is now available at http://astebner.sts.winisp.net/Tools/netfx20_beta2.zip.

  • &amp;nbsp;
    Deciphering specific HRESULT values

    HRESULT 0x80070002 and 0x80070003
    HRESULT 0x80070005...
  • Hi, I have tried all of these things, nothing is working. There was a previous install of SQL Server 2005 that was removed, as well as NET2 using Add/Remove programs. I have tried the cleanup utility, removed all of the listed files/registry entries, renamed mscoree.dll, and have also deleted/renamed a number of other suspicious registry entries in HKLM/Software/Microsoft/Visual Studio and /MSSQL... When I run the VS2005Beta installer (team edition on 2003 sm.business server), it loads the install components, then says a previous version was found click ok to uninstall, ok, exit.

    Any ideas? TIA.
  • Hi Arinaya - there is a known issue with the Visual Studo 2005 beta setup on Windows Server 2003 small business server that will cause setup to report that a previous beta version is installed. Can you try the workaround listed at http://blogs.msdn.com/astebner/archive/2005/05/13/417377.aspx and see if that works for you?

  • Thanks Aaron, that was it.
  • Hi, I have installed a copy of Visual Studio 2005 Beta 2 recently to develop smart device applications. During the installation, there is no error message. However, I can't deploy the exe file to the device emulator. A message box always pop up and says "No such interface supported" when I try to connect to the emulator for Windows Mobile 5.0 Pocket PC and the deployment fails.

    I don't know what happened. I have also searched the internet. No such problem is reported so far. Can someone help me to solve this problem? Thanks.
  • Do you know what the setup failure was for the device emulator ? The no such interface usually come when device emulator is not installed on the machine.

    From your Beta 2 disk, under the setup folder there is a folder called \WCU\ARM run vs_emulator.exe from there and try to install manually. Do reboot the machine before running it.

    Also if you have the device emulator installed this patch helps making connectivty very robust

    http://www.microsoft.com/downloads/details.aspx?familyid=0E05817F-08D6-48A2-A572-CF77ED72C5BE&displaylang=en

    Thanks
    Amit Chopra
  • Hi Aaron,

    For what its worth - I tried your fixed .Net 2 install (http://astebner.sts.winisp.net/Tools/netfx20_beta2.zip) and it worked!

    I had the same problem as Raveresque

    Cheers and Thanks
    Hugo
  • Hi Hugo - thank you for trying out the updated .NET Framework 2.0 beta 2 bits and letting me know that it worked for you. It sounds like you are hitting the issue I described at http://blogs.msdn.com/astebner/archive/2005/08/28/457416.aspx in case you want to read more details about the cause and the fix.

    Thanks!
  • I'm sure a plenty of people have wondered what's under the covers of the Global Assembly Cache, and have...
  • Hi,

    What I'm trying to do is install WinFX (http://www.microsoft.com/downloads/details.aspx?FamilyId=CE888B4C-CCBD-452F-9D90-F4B7190CCA24&displaylang=en)
    I think the prerequisite is that I have to have all previous versions of .NET Framework uninstalled, as well as other Microsoft components.

    I keep getting this error when I'm trying to install it: "Please uninstall Windows Workflow Foundation before installing this product". Windows Workflow doesn't show up as a program when I go to "Add/Remove Programs".

    I had several versions of Microsoft .NET Framework on my computer, as well as the whole Visual Studio suite. I un-installed all those, but I think I didn't do it in the correct order. So, I tried some manual steps that I found on your website, but that didn't help. I also tried the Microsoft clean-up program, but it gave me errors (didn't complete correctly).

    Any advice would be much appreciated.
    Tanya
  • Hi Tanya - you can use the msiinv.exe tool that I described at http://blogs.msdn.com/astebner/archive/2005/07/01/434814.aspx to locate information about the Windows Workflow Foundation component. Msiinv will give you the product code for this product, and then you can run msiexec /x <product code> to uninstall it. If msiexec /x fails, you can use msizap.exe to remove this component as a last resort. I have a beta version of a wrapper tool that automates both of these steps for you that you can try. It is located at http://astebner.sts.winisp.net/Tools/smartmsizap.zip. You'll want to run smartmsizap /p <product_code> using the product code you get from the msiinv output.

    Hope this helps. I realize this is kinda confusing so please contact me again if you try this and run into any issues.
  • Thank you!

    After untold hours spent trying to install a service pack and critical security update for .NET Framework 1.1 I was finally able to do so after removing the 2.0 version. No more MSVS Runtime or sidebyside errors. I'm afraid to try installing 2.0 again.

    Thank you!

    Matt
Page 3 of 10 (136 items) 12345»
Leave a Comment
  • Please add 8 and 1 and type the answer here:
  • Post