.NET Framework Repair

One of problems people run into when running any program written using Microsoft .NET is a corrupt .NET Framework (files missing or damaged.) We’ve seen this problem a number of times when administrators try to run Admin Arsenal (shameless plug.) Usually, it’s difficult to tell exactly what went wrong, since the exact error conditions and error codes aren’t always the same. One common error code is clr20r3, though this code may be related to other issues.

Repairing .NET is very easy, though, so it’s the low hanging fruit you can try if you ever see strange errors related to .NET applications. How you repair .NET will depend on which version of Windows you are running.

On versions earlier than Vista, all you need to do is run the .NET installer, which can be accessed from the “Add or Remove Programs” control panel. You will see a repair option when you click the Change/Remove button:

 

On Windows Vista and later .NET is part of the operating system, so it doesn’t have a separate installer. You’ll need to run a command from an elevated command prompt:

sfc /scannow 

This will replace any operating system files which are missing or corrupt (including .NET Framework files.) On the rare occasion that this doesn’t make the repair, then you will need to perform a repair installation of Windows (run the Windows installer from the original installation disk but select Repair when prompted.)

I haven’t yet seen a .NET corruption problem that isn’t fixed by one of these techniques, so hopefully this should help you out.