While installing NET Framework 3.5 on Windows 10 is straightforward, it's a different story on Windows Server 2012 R2. The Server Manager installation guide on Windows Server 2012 R2 allows users to install two versions of .NET Framework simultaneously: version 3.5 and version 4.5. Installing NET Framework 4.5 poses no issues, and everything works seamlessly.
However, during the standard installation of NET Framework 3.5 on Windows Server 2012 R2, many users encounter the error: '«Installation of one or more roles, role services, or features failed. The source files could not be found...»' displayed on the screen.
The error is caused by binary files of .NET Framework 3.5, which are part of the local cache memory storing binary files on the server when the operating system is installed. These files are executed in Features on Demand on Windows Server 2012 to occupy minimal free space.
To check if .NET Framework 3.5 is in the local storage, use the PowerShell command below:
Get-WindowsFeature *Framework*
As you can see in the image above, the required component has been removed.
By default, the system will attempt to download necessary files from Windows Update (local WSUS server is not suitable for this purpose), and if unsuccessful, users will be prompted to specify the path to the distribution, where the missing files will be installed.
To manually install .NET Framework 3.5 on Windows Server 2012 R2, click on Specify an alternative source path to input the alternative path to the folder containing the installation files for Windows Server 2012 R2.
With the path, you can specify a local folder (in this example, D:\source\sxs, where D:\ is the DVD drive containing the Windows Server distribution) or a network folder.
By clicking OK, the system will locate the .NET Framework 3.5 binary files and install the components.
Additionally, you can perform a similar operation by running the command below in the Windows PowerShell window with Admin privileges:
dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess
Where:
/Online: means you need to upgrade the current operating system version, not the image.
/enable-feature/featurename: NetFX3/all is the essential element for installing .NET Framework 3.5 and its features.
/Source is the path to the folder with the Windows distribution, containing the necessary components.
/LimitAccess prevents access to Windows Update.
A similar command in PowerShell looks like the one below:
Add-WindowsFeature NET-Framework-Core -Source d:\sources\sxs
Additionally, you can fix the original path to the Windows distribution on the system using the command:
Set the registry key RepairContentServerSource located in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing.
Or use the group policy Specify settings for optional component installation and component repair (you can modify the policy settings in this registry).
Note: The Specify settings for optional component installation and component repair policy within GPO: Computer Configuration => Administrative Templates => System, must be activated, and the path to the folder containing the operating system distribution must be specified (path to the alternative source file). To prevent the server from attempting online updates, check the box next to Never attempt to download payload from Windows Update.
Thus, the Mytour article just guided you on how to install .NET Framework 3.5 on Windows Server 2012 R2. If you find the article helpful, don't forget to share it with your friends and family.