Resetting a .NET Installation

Recently I had to re-install an application I had written using C# on a Windows® 2000 server. The server had been restored after a crash from a system backup. The issue was that the registry had been corrupted and many keys had been destroyed altogether.

Once I got onto the server I realized that there were several components I use that needed re-installed. I decided to start with Windows® Update. While there I realized that the .NET framework 1.1 had not been updated. I went ahead with that update and rebooted. When the system came back online, I went back into Windows® Update and realized it was again reporting that the .NET framework 1.1 still needed installed.

To make a long story short, it turns out that I needed to force Windows® update to see the .NET framework as really uninstalled. I started with trying to install using the dotnetfx.exe redistributable file and then removing that, but that didn’t work. In the end it boiled down to removing one file. This file is called mscoree.dll. It is located in ‘C:\WINDOWS\system32’. I simply moved the file from this location to a temporary folder (in case it broke something and I needed to put it back). Once this was done, Windows update saw it as “really” uninstalled and actually re-installed everything.

So, should you find yourself needing to re-install the .NET framework after a system recovery, remember that the easiest way is to simple move the mscoree.dll file and you’ll save yourself a lot of time.

Note: I’m not sure if this is the same with .NET framework 2.0. You’ll have to try it out and let me know should you need to do this on a system that uses .NET 2.0.

Leave a Reply