Introduction

In this article, we will explain how to
  • Install .NET Framework 3.5 Features on Windows Server 2012 R2 (Offline).
  • Install .NET Framework 3.5 Features on Windows Server 2012 R2 (Online).

Scenario

When we tried to install and configure Workflow Manager on SharePoint 2013 environment with Windows Server 2012 R2,  we got the below message:

The .Net Framework 3.5 is not installed on your server.

So that we tried to add a new feature from Server Manager.



We followed the wizard until we got the Features section then we checked the .NET Framework 3.5 Features then we clicked on Install button.


But unfortunately, we got the below error:

The feature Installation failed because the source files could not be found!

  

 Again, we tried to specify an alternative source path as shown below.

Then we specified the source path to .NET Framework 3.5 offline package > OK > Install.

But unfortunately, we still can't enable the .Net 3.5 Framework feature!!


Cause

In Windows Server 2012 R2, the .NET Framework 3.5 feature is an on-demand feature that its files are not saved on the server during the Windows installation due to decreasing the disk space taken by the Operating System. So The feature Installation failed because the source files could not be found!

Install .NET Framework 3.5 Features on Windows Server 2012 R2 (Offline)

Without Internet Connection, you should be aware of the .NET Framework 3.5 feature should be installed from the below sources:
  • The same Windows media that was used when the Windows is being installed.
  • The Windows media with the same current installed version.
    • Eg. If Windows server 2012 R2 has been installed on your machine you must use installation media for Windows Server 2012 R2.
    • Note: If you don't have the same Windows installation media. you can download the corresponding Windows ISO for your current installed Windows from Microsoft as a trial version.
Steps:
  • Mount the Windows installation media (ISO/CD) with the same version of the current installed windows.
  • Specify the alternative source path to U:\Sources\SXS
    • Note: U:\ is the drive that Windows Server 2012 ISO has mounted.
  • Click Install > wait a moment till the feature installed successfully.

Alternatively,
 you can use the Deployment Image Servicing and Management (DISM) command-line tool to enables the .NET Framework 3.5 feature without internet connection as the following:

Deployment Image Servicing and Management (DISM) is a command-line tool that is used to mount and service Windows images before deployment. for more details check DISM - Deployment Image Servicing and Management.

Steps
  • Open Command prompt as Administrator.
  • Type the below cmdlet.
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs
  • d:\ is the drive that the Windows Server ISO has mounted.
  • /All to enable all parent features of the specified feature.
  • /LimitAccess to prevent DISM from contacting Windows Update/WSUS.
  • /Source to specify the location of the files that are needed to restore the feature.

Install .NET 3.5 Framework Features on Windows Server 2012 R2 (Online)

In case you have Internet Connection, You can also use the Deployment Image Servicing and Management (DISM) command-line tool to enables the .NET Framework 3.5 feature as the following:
  • Open Command Prompt as Administrator.
  • Type the below cmdlet.
DISM /online /enable-feature /featurename:NetFx3 /all


Conclusion

In this article, we have explained How to install .NET Framework 3.5 feature on Windows Server 2012 (Online/Offline).

Reference

See Also