Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Enable .Net Framework 3.5 on Microsoft Windows Server 2012 R2

DZone's Guide to

How to Enable .Net Framework 3.5 on Microsoft Windows Server 2012 R2

· Web Dev Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

Recently, I had to put on my System Administrator cap for couple of hours. I was to set up two Dell PowerEdge 1720 server computers for use as Test Servers. The two servers were to run Microsoft Windows Server 2012 R2 and that .Net framework 3.5 must be enabled on the servers as it is one of the requirements needed by the enterprise application to be installed on the servers. 

Enabling .Net framework 3.5 on Windows Server 2012 R2 can be done through the Server Manager by clicking on Add Roles and Features and then under Features selecting .Net framework 3.5 or through Command Prompt or Windows Power Shell. As it is Microsoft’s custom to put the required files for required role or features in the side-by-side folder. One would have thought that .Net Framework 3.5 files should be in the folder also as it is in Windows Server 2012’s side-by-side folder. 

So an attempt to enable .Net framework 3.5 on Windows Server 2012 R2 would give an error “that Installation of one or more roles, role services or features failed. The source file could not be found” like the one shown in the picture below. This means that the .Net framework 3.5 (which includes 3.0 and 2.0) files are not included in Windows Server 2012 R2 setup. 



If the server is connected to the internet and it has Windows update enabled, the framework can be pulled from the internet and added to the Windows installation folder by the OS when enabling the feature. But the servers I was configuring had no internet connections which means that there was no way the framework could be pulled from the internet. 

What I did was to copy the side-by-side folder from Windows Server 2012 setup, (not Windows Server 2012 R2 setup) since it contains the files needed to install the .Net 3.5 framework, I then ran Command Prompt as an administrator with the following commands. 

 dism.exe /online /enable-feature /featurename:NetFX3Serverfeatures /Source:D:\sxs 

To enable the feature

dism.exe /online /enable-feature /featurename:NetFX3 /Source:D:\sxs /LimitAccess

To install the feature 



where D:\sxs is the path of the folder containing the required files that I copied from Windows Server 2012 setup side-by-side folder. 

I hope I have been able to save someone precious time.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:
server ,dotnet ,microsoft ,tools ,windows ,visual studio ,data access ,.net & windows ,c-sharp

Published at DZone with permission of Ayobami Adewole, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}