Install .NET Framework 4 (or 4.6) in Windows Server 2016
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Industries in Orbit Looping
--
Chapters
00:00 Install .Net Framework 4 (Or 4.6) In Windows Server 2016
00:56 Accepted Answer Score 16
01:46 Answer 2 Score 0
02:51 Thank you
--
Full question
https://superuser.com/questions/1183705/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#installation #netframework #windowsserver2016
#avk47
ACCEPTED ANSWER
Score 16
Try to to install .NET Offline using DISM like in this example for .NET 3.5:
Type the following command:
“Dism /online /enable-feature /featurename:Netfx3 /source:D:\Sources\sxs”
and then press enter. It take a while and when the process has finished, close the PowerShell Windows then go to check the exact windows features must be installed successfully.
Thank you @JackLock for this comment:
So based on your suggestion, I enabled feature called "NetFx4". Since it was already installed, I didn't need to provide source of it. So my command looked like
Dism /online /Enable-Feature /FeatureName:NetFx4 /All
ANSWER 2
Score 0
Thank you duDE and JackLock. Both of your answers helped me to fix this problem.
My problem: On Windows Server 2016, the .NET Framework 4.6 had been inadvertently uninstalled from my system while trying to fix some issues with IIS. It was removed using the Server Manager > Remove Roles and Features.
As a result, the Power Shell, Server Manager, and Event Viewer were no longer working. So I downloaded and installed the latest offline version of the .NET Framework 4.7 from Microsoft using the installer. However, it did not fix the problem when installed by clicking on the installer.
Solution To fix the problem, I had to install it from the command line using the "/all" switch. I unzipped the installer to a folder and here is the command that I used to install it. In the last argument in quotes is the path to the installer, which will need to be modified based on where you have the installer unzipped:
Dism /online /enable-feature /all /featurename:Netfx4 /source:"E:\t\NDP47-KB3186497-x86-x64-AllOS-ENU (Microsoft .NET Framework 4.7)"