Install .NET Framework 3.5 using Powershell and DISM
WHAT IS MICROSOFT .NET FRAMEWORK 3.5?
Microsoft .NET Framework 3.5 is a common prerequisite for legacy applications and a general guideline is to install it. This post is a guide for how to install .NET Framework 3.5 on Windows Server 2012, Windows Server 2016 and Windows 10.
First available on January 16, 2008, the Microsoft .NET Framework 3.5 is a framework with a shared library of code that can be used by developers. It also provides a run-time environment for applications.
HOW DO I KNOW WHICH VERSIONS OF .NET FRAMEWORK I HAVE INSTALLED?
There are several ways of checking which .NET Framework versions you have installed:
- Control Panel
For more information refer to this article:
HOW DO I INSTALL IT?
This blog post describes how to install .NET Framework 3.5 using:
- Command line (DISM)
- Server Manager (GUI)
- Offline Installer
Unfortunately, installing Microsoft .NET Framework 3.5 is not as straight forward as you might think. Microsoft has a guide for installing .NET Framework 3.5, but it does not provide the full story.
If you are trying to install the feature from Server Manager or from Programs and Features, you will see this error during installation:
“Do you want to specify an alternate source path? One or more installation selections are missing source files…”
You can use any of the below solutions to solve the issue with installing .NET Framework 3.5.
Go to a command prompt and enter this command:
dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess
Note: Source should be the Windows installation disc. In my case, this was located on D:
It is also possible to install .NET Framework 3.5 using Powershell. Use this command to accomplish this:
Add-WindowsCapability –Online -Name NetFx3~~~~ –Source D:\sources\sxs
ADD ROLES AND FEATURES WIZARD
Go down to Specify an alternate source path and enter <media drive>:\sources\sxs as the path.
Enter the source path. This should be the Windows media path.
INSTALL USING OFFLINE INSTALLER:
You can also install .NET Framework 3.5 using the Offline Installer: https://www.microsoft.com/en-us/download/confirmation.aspx?id=25150
Once you have followed one of the above 3 installation methods, you should see the .NET Framework 3.5 Feature installed. You can verify this via:
- The GUI
Use the below Powershell command to see if .NET Framework 3.5 has been installed and with which subversions:
(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5").Version
- Windows Server 2012 rebooting? Activate!
- How to change between Server Core and Full GUI in Windows Server 2012
- Run Powershell commands as Administrator
Sponsored Tech Tip : Install your .NET framework on high performance virtual dedicated server such as Windows Server to monitor/access it remotely from anywhere, anytime on any device(PC/Mac/android/iOS) with desktop hosting service from www.CloudDesktopOnline.com. If you prefer a server, Rent a Hyper-V dedicated virtual server at an affordable pricing and 24*7*365 days live tech-support from one of the leading DaaS providers – Apps4Rent.
About the author
Daniel Classon works as a Senior Consultant at Mansoft, focusing on Microsoft Configuration Manager, Windows 10 and Powershell