.NET 3.5 on Windows Server 2012 R2 – still an issue

During a recent (re)deployment of one of the Skype for Business 2015 servers, which were (still) based on Windows Server 2012 R2, we stumbled across another .NET 3.5 installation issue. Where this is a hard prerequisite for installing any Skype for Business role, it stopped us from progressing for a moment. As the solution was not any of the already written blog posts, I’ve decided to write one on it. Installing .NET 3.5 on a Windows Server 2012 R2 in 2019

The factor what made this situation more complex, might be that we have WSUS enabled in the domain, but WSUS itself was down. Installing .NET 3.5 can be done in several ways:

  • Via the Server Manager / add components
  • Via PowerShell: Add-WindowsFeature NET-Framework-Core -Source <<source>>
  • Via DISM.exe / command line: DISM.exe /online /enable-feature /featurename:NetFX3 /All /Source:<<source>> /LimitAccess

Though this requires the ISO, WSUS or Windows Update: .NET 3.5, amongst some other components, are not available by the cached binaries by default. In our situation, this is the point where we got into the errors: One could receive 0x800F081F, 0x800F0954, 0x800F0906 – all result in failure, and all mention that the binaries cannot be accessed or downloaded.

Simply disabling the GPO managing its settings is not enough to remediate from this. Nor is it to simply update the local policy afterwards. Whatever we tried, whatever solution opted – changing the policy and/or a hard option to get it from the ISO or download it from WU – all failed with one of these errors, repeatedly.

Though It’s a specific combination of different solutions which did the trick in this situation.

Prerequisites

The sole prerequisite in this situation is to have access to a working Windows Server 2012 R2 Server, with .NET 3.5 already installed. As we need to connect to its binaries – a Windows Server 2012 R2 ISO did not the trick for us.

The solution

Step 1: Update the local policy

First step in the procedure is to update the local policy:

  1. Open the Group Policy Management Editor on the specific server (start > run > “gpedit.msc“)
  2. Open Computer Configuration > Policies > System
  3. Find the setting “Security settings for optional component installation and component repair” and open it (double click)
  4. Alternate some settings:
    1. Enable the policy (radio button “Enabled”)
    2. tick the “download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)
    3. fill in the “alternate source file path“: this path should be the UNC path to another Windows Server 2012 R2 server, with .NET 3.5 successfully installed. E.g. \\server1.domain.local\c$\windows\WinSxS
  5. Click OK and exit the editor.

Step 2: Apply the policy

The next steps follow each other up quite quickly. Next up is to apply the policy, via the command line option “gpupdate /force“. Just make sure your WSUS policy is not active anymore on this server.
Therefore I doubt if this step is 100% needed, though in our situation it looked like the extra push needed;

Step 3: Restart the Windows Update Service

Using the following commands:

Net stop wuauserv
Net start wuauserv

Step 4: Apply the feature via DISM

Last but not least, we can install the .NET 3.5 via the following command:

DISM /Online /Enable-Feature /FeatureName:NetFX3 /All

And this time, fingers crossed, it will succeed…

Why it is so hard to install this feature is still a mystery, but in our troubleshooting it looked like the combination of a previously configured WSUS policy, a partly updated server, together with the unavailability of the right version on the ISO. In anyway, hopefully above procedure will help you in your situation as well!

Leave a Reply

Your email address will not be published. Required fields are marked *