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 all,

    I am trying to create an ODBC connection to Access 2003 from vb.net2005 final version with framework 2.0 final version (I didn't install the beta version before), but when the code trying to open the connection this error appears:

    Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ,  
     at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
      at System.Data.Common.ADP.NeedManualEnlistment()
      at System.Data.Odbc.OdbcConnection.Open()
      at abd.frmSplash.frmSplash_Load(Object sender, EventArgs e)

    I run the same code on another pc and it run without any problem, I think that the problem in the framework.

    Note, when I installed the .net2005 an error occurred first time, then I tried to install it second time and it run without error , may be the framework installed from the first time and didn't installed at the second time, so this may be the error.

    Any help for this problem?

    Thanks in advance.
  • Hi .NET Developer - This does seem like an issue with the .NET Framework 2.0 on this system.  Can you please try to repair it using the entry in Add/Remove programs and see if that helps?  If it does not help, can you please try to uninstall the .NET Framework and then reinstall it from the folder \wcu\dotnetframework\ on your original VS 2005 installation media or from http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5?
  • thanks  astebner,

    but i tried to uninstall the framwork and by mistake i removed something else, so i installed the framework again and repaired vb.net and every thing is work now

    thanks for you all

    assalamu alaikum (bye in arabic)'

    .net developer
  • Aaron,

    Developer here; think I may have a unique one. Scanning through the comments it looks like my current error is most similar to Nadav in January. My original error propagated, however, from adding an assembly to the GAC, presumably corrupting it. I have uninstalled MSVS 05 and .NET2.0 in attempt to fix it, now I have the failing .Net 2.0.
    Ran the tools.
    Any additional thoughts/info on gacutil.exe leading to this issue?

    Thnx,
    Nash
    ashworth@comcast.net
  • Nash again,

    The solution cleaned up my corrupted Global Assembly Cache; thanks. 'Delete the GAC_32 and GAC_MSIL folders' perhaps? The action seemed to be the difference.

    Nash
  • Thanks for posting this thread - I had a client who had an error message that said:

    IsSysTxEqualSysEsTransaction
    Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    A this was the only place I could find it mentioned and resolved.

    My client just repaired his version of the dot net framework and all was well!

    Best Regards to all concerned and thanks again for the post.
  • I have posted an updated version of the .NET Framework cleanup tool that now contains support for automatically...
  • Ok guys, I appoligize for my stupidity :-).  I really need to get framework 2.0 installed on my computer, however when installing I get the dreaded 25015 error, the stupid

    microsoft.visualbasic.vsa.dll

    because of system error: the directory name is invalid.

    I have seen the same problem on here many times, but I must be to blind to see the solution if any.  If some brave soul wants to take on my problem please email me at alanrc2000@yahoo.com, thanks alot, you guys are greaaaat !
  • Hi Alan - Can you please try to use the automated cleanup tool to remove any pieces of the .NET Framework 2.0 that are on your system and then try installing again?  You can find information about the cleanup tool at http://blogs.msdn.com/astebner/archive/2006/05/30/611355.aspx.

  • A friend of mine downloaded the final version of Net Framework 2.0 from Microsoft.com.  While he did this for me I downloaded the redistributable pack.  The reason my friend downloaded the Net Framework file is that he had Broadband access and I only have dial up.  The day the disk with the Net Framework arrived, I was very sleepy.  I accidentally loaded the Net Framework before loading the Redistributable pack.  I tried uninstalling and reinstalling the Net Framework, but to no avail.  I don't want to destroy any dll's because I had bad luck with a dll a few years back.  Is there anything I can delete that will allow me to reinstall Net Framework 2.0 without destroying any dll's?  I would be happy to delete any registry keys.  
  • Hi Ted - The .NET Framework is the same thing as the redistributable pack.  I don't think you should need to uninstall and reinstall.  If you find that it is necessary, you can try out the removal tool at http://blogs.msdn.com/astebner/archive/2006/05/30/611355.aspx.  Hope this helps!
  • PingBack from http://blogs.msdn.com/astebner/articles/492809.aspx
  • How do i install .Net Framework 2.0 without administrator login ?
  • Hi oyeGURU - You will need to deploy the .NET Framework 2.0 with elevated privileges using Active Directory if you want to install without an administrator logging in.  A lot of the things that the .NET Framework setup does require administrator rights, so you cannot install as a normal user.

    You can find instructions for how to do this kind of deployment at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/ndp2_dplad.asp.
  • PingBack from http://www.remembersite.com/2006/08/09/how-fully-clean-an-old-net-framework-20-installation/
Page 5 of 9 (135 items) «34567»
Leave a Comment
  • Please add 4 and 2 and type the answer here:
  • Post