Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2012 R2 / How to Install .NET Framework 3.5 on Windows Server 2012 R2

February 20, 2018 Windows Server 2012 R2

How to Install .NET Framework 3.5 on Windows Server 2012 R2

Most modern Windows applications require .NET Framework to work properly. The roles and features setup wizard Server Manager in Windows Server 2012 R2 allows to install two different versions of .NET Framework at a time – 3.5 and 4.5. The installation of .NET Framework 4.5 doesn’t usually cause any problems – it’s very simple, however, you can’t say exactly the same about the installation of .NET Framework 3.5.

install .NET Framework 3.5 windows 2012 r2

Actually, when trying to install .NET Framework 3.5 in Windows Server 2012 R2 with the standard settings, the following error message appears: “Installation of one of more roles, role services or features failed. The source files could not be found…”.

.net framework 3.5 installation failed

The reason behind this behavior is that .NET Framework 3.5 binary files are not a part of the local cache of the binary files that are saved on the server’s system disk when the operating system is being installed. This is done under the concept of Features on Demand in Windows Server 2012 to reduce the amount of disk space occupied by the OS for its own needs.

Check if .NET Framework 3.5 is in the local repository using the Powershell command:

Get-WindowsFeature *Framework*

Get-WindowsFeature *Framework*

powershell get framework status

As you can see, the required component is deleted (Install State: Removed).

By default, when you install NET Framework 3.5 through Server Manager, the system tries to obtain the necessary files from the Windows Update website over the Internet (not from the local WSUS server), and if the server does not have Internet access, the installation fails. The user needs to specify the path to the OS distribution from which the missing component could be installed.

To install .NET Framework 3.5 manually, click Specify an alternative source path to enter an alternative path to a folder containing the installation disk of Windows Server 2012 R2.

Tip. The installation disk must contain the same version of OS that you have installed (the same edition, language, and updates are important). If the installer does not find the required files in the specified folder, see the solution below.

specify alternative path .net installation

As the path, you can specify either a local folder (in our example it is D:\source\sxs, where D:\ is a letter of the local DVD drive with a Windows Server distribution), or a network folder.

windows server 2012r2 sxs sources

By clicking OK, the system will find .NET Framework 3.5 binaries and install the component.

installation of dot net framework 35 failed

The same operation can be performed from the command prompt by running the following command as an administrator:

dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess

dism /online /enable-feature /featurename:NetFX3 /all /Source:d:\sources\sxs /LimitAccess

/Online means that you need to upgrade your current OS, and not the wim image

/enable-feature/featurename: NetFX3/all means that it is necessary to install .NET Framework 3.5 with all its features

/Source is the path to the directory with Windows distribution, which contains the necessary components

/LimitAccess prevents accessing Windows Update

dism install framework35

The same operation in PowerShell for installing .Net 3.5 looks like this:

Add-WindowsFeature NET-Framework-Core -Source d:\sources\sxs

Add-WindowsFeature NET-Framework-Core -Source d:\sources\sxs

Path to the original Windows distribution can be set in the system on a regular basis using:

  • the registry parameter RepairContentServerSource that is located in the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing branch
  • or a group policy Specify settings for optional component installation and component repair (the policy changes this setting in the registry)

gpo specify component source path

Note. The group policy Specify settings for optional component installation and component repair is in the following section GPO: Computer Configuration -> Administrative Templates -> System. The policy should be enabled and the path to the directory with the OS distribution should be specified (Alternative source file path). To prevent the server from trying to update online, check the box Never attempt to download payload from Windows Update.

To verify that the .NET Framework 3.5 is installed, go to the C:\Windows\Microsoft.NET\Framework64 directory and make sure that v3.5 folder appeared.

Framework64 folder v3.5

If the .NET Framework 3.5.1 installation methods described above did not help you, try the following solutions.

After installing some updates, the version (build) of Windows Server 2012 R2 in the system may cease to correspond to the image of the OS stored in your distribution image. In this case, the installer, when comparing the version of the Windows kernel, refuses to install the deprecated version of the component. In this case, as a rule, when you install the .NET Framework through dism, the following error occurs: 0x800f081f. The source files could not be found

0x800f081f. The source files could not be found - .net 3.5 install error
To fix the problem try to install .Net online through from Microsoft servers:

  • Save the current Windows Update settings to the reg file (key HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate)
  • Delete this key and restart the WU service: net stop wuauserv & net start wuauserv
  • Run the .Net5 online installation: DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
  • After the installation is complete, return the WU settings by importing the reg file and restart the WindowsUpdate service again
Tip. In the future, you can use folder C:\Windows\winsxs from this server to install .Net FrameWork 3.5 on other servers with the same version of the OS. Copy the C:\Windows\winsxs folder to the desired server in the C:\tmp\winsxs directory and install the component with the command:
dism /online /enable-feature /featurename:NetFX3 /all /Source:C:\tmp\winsxs /LimitAccess

In addition, if you installed a Language Packs on the server, before you install the .NET Framework 3.5.1, you must uninstall it using the lpksetup command.

Also check that there are installed patches for NET 3.5 Framework in the list of installed system updates (in theory they should not have been installed if the NetFX3 component is not installed).

remove NET 3.5 Framework patches installed via Windows Update

Uninstall this updates and after the reboot, try installing .NET 3.5.

19 comments
4
Facebook Twitter Google + Pinterest
previous post
How to Configure DKIM on Exchange Server 2010/2013
next post
Enable Multiple Concurrent RDP Sessions in Windows 8.1 /8

Related Reading

Using TSADMIN.msc and TSCONFIG.msc Snap-Ins on Windows Server...

February 2, 2021

Updating the PowerShell Version on Windows

December 24, 2020

Zerologon (CVE-2020-1472): Critical Active Directory Vulnerability

December 4, 2020

How to Run CMD/Program under SYSTEM (LocalSystem) in...

December 3, 2020

Remote Desktop Services Is Currently Busy

October 27, 2020

19 comments

Erik Nettekoven October 22, 2014 - 3:54 pm

If you encounter problems installing .NET 3.5 (source could not be found error), install this update:
https://support.microsoft.com/kb/3005628

Reply
Nial May 3, 2016 - 11:01 am

Thank you. 
It was very useful article. 

Reply
Hari June 16, 2016 - 11:01 am

thank you , it helped me 

Reply
Govindharaj June 30, 2016 - 12:23 pm

the request to add or remove features on the specified server failed installation on one or more roles, role services or features failed. error:0x800f0907
I was troubleshoot all the given process getting same issue
 

Reply
Govindharaj June 30, 2016 - 12:25 pm

Pls give me the solution asap

Reply
Artyom September 7, 2016 - 10:03 am

Thx for very useful article!
 

Reply
Gyandev September 8, 2016 - 11:00 pm

Thanks….Really it help me

Reply
A.Shokri September 22, 2016 - 9:03 am

Thanks….it helpfull

Reply
Pavan October 18, 2016 - 10:25 pm

The issue exists even after doing that. 
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
 
C:\Windows\system32>dism /online /enable-feature /featurename:NetFX3 /all /Sourc
e:C:\Windows\WinSxS /LimitAccess
 
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031
 
Image Version: 6.3.9600.17031
 
Enabling feature(s)
[===========================66.2%======                    ]
 
Error: 0x800f081f
 
The source files could not be found.
Use the “Source” option to specify the location of the files that are required t
o restore the feature. For more information on specifying a source location, see
 http://go.microsoft.com/fwlink/?LinkId=243077.
 
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
 
C:\Windows\system32>dism /online /enable-feature /featurename:NetFX3 /all /Sourc
e:C:\Windows\WinSxS /LimitAccess

Reply
Max October 19, 2016 - 9:02 am

You are use wrong Source parameter. Instead pointed on files in C:\Windows\WinSxS, you must specify path to winsx folder on USB/ ISO / mounted iso file with Windows 2012 distribution.
For example:
Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:E:\sources\SxS /LimitAccess

Reply
mondbala December 31, 2016 - 4:51 pm

thank you so much. it solved my problem

Reply
Kory April 21, 2017 - 4:37 pm

Thank you for this. Solved my problem. Cheers!

Reply
Sathish December 1, 2017 - 12:44 pm

Hi,

I would like to know, can we use any powershell or DISM commands to enable ‘Specify settings for optional component installation and component repair’ under Group policy editor in order to install NetFx3 from online.

Kindly assist me, I am looking for automate this process.

Reply
Mohammad Reza Gerami January 2, 2018 - 11:25 am

if you have a problem with install .NET 3.5:
follow these comands with powershell:

Get-WindowsFeature *Framework*
Install-WindowsFeature Net-Framework-Core -source d:\sources\sxs

Reply
Josh July 19, 2018 - 5:10 pm

In one of your screenshots above you note D:/Source but it should be D:/Sources

Reply
5g6t March 6, 2019 - 8:27 pm

I upgraded 5 servers to 2012r2 from 2008r2….production….
Could not get 3.5 to install.
Found a reference server that had same windows version but was in a different domain, and had 3.5 installed.
The windows update/group policy changes did not work for me.
so ran:
net use z: \\%IP%\c$ /user:%domain%\%username%

dism /online /enable-feature /featurename:netfx3 /all /LimitAccess /source:z:\windows\winsxs

Reply
Chris July 3, 2019 - 3:00 pm

Hello, I wrote a Powershell script for the above registry method Which seems to work best for me. see below:

https://github.com/ctejeda/PowerShell-Modules/blob/master/Force-Install.NET-Framework

Reply
Franky February 7, 2020 - 6:37 pm

Damn dude I wanna hug you for this, worked as a charm thanks

Reply
Fish June 4, 2020 - 9:39 pm

Very helpful. The DSIM CMD helped me on a box with no internet access. I pointed it to another 2012 R2 box that already had it and it worked like a charm.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

    February 5, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Run Program without Admin Privileges and to Bypass UAC Prompt?
  • Updating List of Trusted Root Certificates in Windows 10/8.1/7
  • Installing SFTP (SSH FTP) Server on Windows with OpenSSH
  • Managing Printers and Drivers with PowerShell in Windows 10 / Server 2016
  • How to Clean Up “System Volume Information” Folder
  • PSWindowsUpdate: Managing Windows Updates from PowerShell
  • SMB 1.0 Support in Windows Server 2012 R2 / Windows Server 2016
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top