After working on a corrupt .NET installation for many hours we placed a call to Microsoft tech support because we could not get around errors like:
This application requires one of the following versions of the .NET Framework v4.0.30319
when launching Azure AD Sync or even Server Manager.
Microsoft Server Tech Support contractor Samson Peng gave us the following commands to uninstall, reinstall and repair .NET that we could not find anywhere on-line.
Of course this process will change in the future with .NET5 and .NET6 but these commands and logic which relate to .NET4 should give you a good starting point.
If you don’t already have an .ISO (or DVD) available, you can download one for free from the Windows Evaluation Center HERE (click WINDOWS SERVER along the top menu bar then select your version).
Note: If you see an error, just keep going. It is likely that you just don’t the feature in question
Open a PowerShell as an Admin and run each of these commands one by one adjusting the D:\SOURCES path to whatever your ISO is mounted as:
dism /online /disable-feature /featurename:Netfx4 /norestart
dism /online /enable-feature /featureName:Netfx4 /source:wim:D:\sources\Install.wim:4 /limitaccess /norestart /all
dism /online /enable-feature /featureName:MicrosoftWindowsPowerShell /source:wim:D:\sources\Install.wim:4 /limitaccess /norestart /all
dism /online /enable-feature /featureName:Server-Gui-Mgmt /source:wim:D:\sources\Install.wim:4 /limitaccess /norestart /all
dism /online /enable-feature /featureName:Server-Gui-Shell /source:wim:D:\sources\Install.wim:4 /limitaccess /norestart /all
Open a PowerShell as an Admin and run each of these commands one by one adjusting the D:\SOURCES path to whatever your ISO is mounted as:
Note: If you see an error, just keep going. It is likely that you just don’t the feature in question
DISM.exe /online /enable-feature /all /featurename:NetFx4
DISM.exe /online /enable-feature /all /featurename:MicrosoftWindowsPowerShell
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Now try whatever was failing before.
Thanks Samson!
This website uses cookies.
View Comments
Good info and right to the point on how to fix .NET.