How to Repair or Reinstall .NET Framework 3.5


Update: 8 May 2013 – The comments posted below from selfman are so good that they need to be incorporated into the main body of this article on fixing .NET Framework issues. For his full description see his comment below.

.NET Framework Setup Verification Tool

.NET Framework Cleanup Tool

There are times when .NET Framework can get corrupted on a computer. A corrupt .NET 3.5 can prevent PDQ Inventory from successfully scanning / managing the computer. To repair .NET Framework 3.5 refer to the instructions below. It is suggested that you log into the problem computer to repair. This way you can get some good feedback on whether the repair worked.

Windows 7 / Windows Server 2008 R2

.NET Framework 3.5 SP1 is included in these two OSes and cannot be installed, repaired or uninstalled via the .NET Framework setup file. They need to be enabled or disabled as Windows Features. In Windows 7 and 2008R2 disabling .NET 3.5 SP1 is the same thing as Uninstalling or removing. Note: A reboot may be required after disabling/removing .NET 3.5 SP1.

To Repair From The Command Line

Open cmd.exe in an Elevated session (needed if UAC is implemented).

The next step is to disable the .NET 3 Windows Feature. 

Run the following command at your command line:

DISM /online /disable-feature /FeatureName:NetFx3

(note that when using DISM all Feature Names are Case Sensitive. Using “netfx3” will result in a failure)

After you successfully disable the NetFx3 feature you can now re-enable it. Re-enabling is the same thing as Installing.

DISM /online /enable-feature /FeatureName:NetFx3

The screenshot below shows the results of both commands run in sequence.

use dism to repair net resized 600

Start a trial of PDQ Deploy

To Repair Manually from GUI

Go to Control Panel > Programs and Features > Turn Windows features on or off

Clear the check box for Microsoft .NET Framework 3.5.1. Say OK.

After Windows disables the feature you will need to go back  re-enable Microsoft .NET Framework 3.5.1

use Windows Features to Repair resized 600

 

Windows XP / Windows Vista / Windows Server 2008

To Repair From Command Line

Open cmd.exe in an Elevated session (needed if UAC is implemented).

The next step is to call the Setup.exe and pass the appropriate command line arguments. 

Run the following command at your command line:

"%WINDIR%\Microsoft.NET\Framework\v3.5\Microsoft .NET 3.5 SP1\setup.exe" /qb /norestart

If you pass the

/qb

argument you will still see the uninstall window but you will not be prompted for any input. Do not use /qb if you are going to deploy the .NET installation / repair via PDQ Deploy. Instead use the

/q

argument as this will suppress all install windows.

To Repair Manually from GUI

Go to the .NET setup directory in %WINDIR%\Microsoft.NET\Framework\v3.5\Microsoft .NET 3.5 SP1 and run setup.exe. After the .NET installation files are loaded the following window will appear. Choose to Repair (recommended) or Uninstall. If you choose to Uninstall you will need to re-install .NET again.

net repair resized 600

 

If you want a comprehensive resource to reference .NET repairs you should check out this excellent article from Aaron Stebner’s WebLog.

Start a trial of PDQ Inventory