Installing .Net 3.5 on Windows 2012 R2

13

So I am trying to Install .net 3.5 on a windows 2012 R2 Server. I have tried via the Add Feature and via DISM both fail.

When trying via Add Features GUI I am using the “Specify Alternate Path” This fails with the error “installing of one of more roles, role services, or features failed”

When trying via an Elevated PowerShell to use DISM I am using the following command.

dism.exe /online /enable-feature /featurename:NetFX3 /Source:d:\sources\sxs 

This fails with

Error: 0x800f0906 The source files could not be downloaded. Use the "source" option to specify the location of the files that are required to 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

I have followed the KB listed above (243077) to set the group policy location for the SXS folder. Rebooted and still the same error. The DSIM log shows the following

Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0906)

A quick google shows that a lot of people are having problems with this and that you should uninstall KB2966826 and KB2966828 this server hasn’t got either installed.

I have also tried the offline .Net installer and it says that I must add it via windows features. All commands have been run as an administrator and via an elevated prompt.

While writing this I searched noticed the "Similar Questions" and took at look at this Unable to install .net 3.5 on Windows server 2012

Running

dism.exe /online /enable-feature /featurename:NetFX3 /all

Produced the same error as above.

windows
windows-server-2012-r2
.net-3.5
asked on Server Fault Jul 14, 2015 by Zapto • edited Apr 13, 2017 by Community

10 Answers

13

The command I use to install .NET Framework 3.5 on Windows 8.1 and Server 2012 R2 is:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs

Where D:\ is the mounted ISO or DVD drive. The only difference from yours is the /LimitAccess, but I believe that is the important part, as it prevents it from attempting to contact Windows Update or WSUS. For whatever reason, this aspect (contacting Windows Update) is totally broken for .NET Framework 3.5 on Windows 8/8.1 and Server 2012/2012R2 and will always cause it to fail.

See also: http://blogs.technet.com/b/askcore/archive/2012/05/14/windows-8-and-net-framework-3-5.aspx

answered on Server Fault Jul 18, 2015 by Joshua McKinnon
6

I had the same issue when I mount the Windows install disk or use the physical DVD, and here's how I fixed it:

  1. Create a folder under root (C:\NetFx3 for example)
  2. Copy the microsoft-windows-netfx3-ondemand-package.cab from a Windows install disk .\sources\sxs to the C:\NetFx3 folder
  3. Command Prompt as an administrator
  4. DISM.exe /online /enable-feature /featurename:NetFX3 /All /Source:C:\NetFX3 /LimitAccess
  5. The text progress bar will go to 100% when completed and will give you a message: "The operation completed successfully".

For whatever reason, my optical drive shows the files on the disk, but the DISM doesn't like it, but copying the files to C: seems to have worked.

answered on Server Fault Jul 20, 2015 by Peter
2

The solution for me was a combination of these answers. I was on a machine with Windows Server 2012 R2.

I tried working around the fact that I did not have an ISO of the OS on-hand. But could not get it to work. So I was forced to find an ISO for Windows Server 2012 R2.

1.) Start the Local Group Policy Editor or Group Policy Management Console (WIN+R and type gpedit.msc).

2.) Expand Computer Configuration, expand Administrative Templates, and then select System.

3.) Open the "Specify settings for optional component installation and component repair Group Policy" setting, and then select Enabled.

4.) Select the "Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS)" checkbox. Click Apply, Click Ok.

wsus settings

5.) Download an ISO of the OS and mount the image. I downloaded one here: https://www.technig.com/download-windows-server-2012-r2-essentials-iso-file/

*Note: it's a 3Gb file.

6.) Open an elevated Powershell and run:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:E:\sources\sxs

*Note: the ISO was mounted to the "E:\ drive" in this case.

install Net 3.5 with Powershell

*This thread was a life-saver. Thanks to all contributors, especially @Joshua McKinnon!

answered on Server Fault Jul 15, 2019 by Guy Clark Rimel
1

None of the above methods worked for me. It turned out I had a WSUS server configured. The only way I could install it was

1) Regedit

2) Go to Computer->HKEY_LOCAL_MACHINE->SOFTWARE->Policies->Microsoft->Windows->WindowsUpdate

3) Made note of the values of the two keys: WUServer and WUStatusServer

4) Deleted/Renamed these keys

5) Stopped and Started WindowsUpdate

6) Added the .Net3.5 feature

7) Put the keys back and restarted WindowsUpdate.

I hope it helps

answered on Server Fault Feb 27, 2017 by formica • edited Feb 28, 2017 by formica
1

There's lots of stuff on the internet on this and most of it was summarized in the answers here. We tried it all and none of it worked. Even when pointing at various copies of the sxs folder, it still would get a variation of the "source files not found" error.

I finally pointed it at a share of the the winsxs folder on another fully patched server that did have .net 3.5 (c:\windows\winsxs) and it worked:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:\\otherserver\winsxs

My theory is that the install process was looking for source files that matched the current KBs on the server. I know there are other articles pointing to the removal of two particular KBs, but those did not show up in our list of installed patches.

Also note that add/remove features did not work with this share. I had to use DISM.

answered on Server Fault Jan 23, 2019 by b_levitt
0

When the DISM command skips the media specified by the /Source switch and goes looking for the files online, it means that the source files in the specified media is either corrupted or not applicable to your server (version mismatch).

The error code 0x800f0906 further proves this behavior as documented by Microsoft: https://technet.microsoft.com/en-us/library/dn482067.aspx

Your best bet is to help solve this problem is to:

  1. Change the media you're using, re-download if possible.
  2. Present the media in different methods. If it's a VM, mount an ISO. If it's physical, burn to a DVD. if both files, copy to a local disk. If that fails, try a shared folder.
  3. If all of the above fails, I read that you're using WSUS, try configuring WSUS with an "Update Source" location, where you have sxs folder copied to a shared folder, the servers in your network will use that folder as a source for installing Windows componants: https://technet.microsoft.com/en-us/library/dn482065.aspx
  4. If using WSUS is not option for any reason, remove the GPO from the server and insure that it settings are not cached by running "gpupdate /sync /force", once done, try to do the installation Online from the internet using the command "DISM /Online /Enable-Feature /FeatureName:NetFx3 /All"

If all of the above fails, I highly recommend that you provide the DISM servicing logs to do any further troubleshooting, but at this stage, I would leaning more to do a full server rebuild.

answered on Server Fault Jul 23, 2015 by Noor Khaldi
0

Your DISM command isn't finding the required resources because it's checking for the source "online". Windows 6.2+ will (by default) check only with the update source server for component install/repair if an update source is specified for the Windows Update Service.

If you don't want to set up your update source (usually WSUS) server as the source for repairing/installing components, then you can enable the following Group Policy:

Computer Configuration \ Administrative Templates \ System

Specify settings for optional component installation and component repair

Make sure to check this option:

Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS)

answered on Server Fault Jul 23, 2015 by austinian • edited Jun 11, 2020 by Community
0

Make sure your Sources media absolutely match your version of Windows.

I spent half a day trying to use Server 2012 ISO to install .NET35 on Server 2012 R2. Once the source is correct, DISM command (from this answer) works flawlessly.

answered on Server Fault May 19, 2016 by alex.z • edited Apr 13, 2017 by Community
0

I have had the exact same issue. My resolution was to remove the server from Active Directory, Install .Net 3.5, then add back to AD. I'm sure it has to do with WSUS at some layer, but that solved it for us. We just make sure we install 3.5 on all servers before adding to the domain.

answered on Server Fault Feb 27, 2017 by Chris Satola
0

I've been able to solve this by using the server manager add features wizard and there specifying an alternate source there.

Got this info from http://www.danielclasson.com/install-net-framework-35-server-2012/

Option 1 did not work for me either, option 2 completed successfully.

answered on Server Fault Jun 21, 2017 by Mickeybyte

User contributions licensed under CC BY-SA 3.0