Fix - Unable to install Dot Net 3.5 (.Net) on Windows Server 2012 R2

Tried to install Microsoft SQL Server 2012 on a Windows 2012 R2 and had the following error:-

The following error has occurred:

Error while enabling Windows feature : NetFx3, Error Code : -2146498298 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143

OK simple enough I thought, so I just used PowerShell and ran:-

Install-WindowsFeature –name NET-Framework-Core

but that got to about 68% and failed.  OK maybe it needed the media (DVD/ISO) of the original VM creation.  So again tried the following PowerShell:-

Install-WindowsFeature –name NET-Framework-Core –source Z:\Sources\SXS

but again got to about 68% and failed - very odd as never had issues installing .Net 3.5 before on a modern server.  Looking around the internet it seemed if you had any of the following KB's installed from the Windows update it was a good idea to remove first:-

  • KB2966826
  • KB2966827
  • KB2966828

But I didn't have these installed as a fairly new server build.

FIX:-

The fix was fairly simple.  On the Server open Group Policy and open the following:- Local Computer Policy -> Computer Configuration -> Administrative Templates -> System

Find the Setting that says:-

Specify settings for optional component installation and component repair

Click Enabled and tick the box that says:-

Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)

Click apply and OK, then back in PowerShell run:-

Install-WindowsFeature –name NET-Framework-Core

And thankfully .Net 3.5 will now be installed.

Comments are closed