Microsoft SQL Server 2012 Setup Error when enabling NetFx3 ( Error Code:–2146498298 )

Whilst recently installing SQL Server 2012 onto a fresh Windows Server 2012 install, I received the following error message:

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

SQLServerInstallErrorNetFX01

The Problem

The problem is caused by the fact that that SQL Server installation process fails to automatically install and enable the .NET Framework 3.5.

The Solution

The solution to the problem is to manually enable .NET Framework 3.5 from the command prompt and then run the SQL Server installation process again.

Resolution Steps

  1. Insert / mount the Windows 2012 Server installation media in your server. On my server this was the E: drive (change the command line below to match your environment).
  2. Enable .NET Framework 3.5 from the command prompt using the following command:

dism /online /enable-feature /featurename:NetFx3 /all /source:e:\sources\sxs /LimitAccess

SQLServerInstallErrorNetFX02

Conclusion

The operation finished successfully from the command prompt and
I was then were able to install SQL Server 2012 successfully.