Monday, March 10, 2014

SQL 2012 Installation Error - Error while enabling Windows feature NexFx3

While installing SQL Server 2012 on a server running Windows Server 2012, I occasionally run into an issue where the installer couldn't properly enable the .NET 3.5 role.  I was able to make it completely through all of the setup dialogs and configurations (including clicking Install to start the installation process), and it failed shortly into the install process with this error message: 
Error while enabling Windows feature : NexFx3, 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

In order to get around this issue, you need to manually enable the .NET Framework v3.5 role:
  • Launch Server Manager
  • Go to Manager and choose Add Roles and Features
  • Click Next at the Before you begin page
  • Verify Role-based or feature-based installation is selected and click Next
  • On the Select destination server page, verify the local server is selected and click Next
  • On the Select server roles page, just click Next
  • On the Features page, check the box for .NET Framework 3.5 Features and click Next
  • Click Install to perform the installation

If you have issues with the Add Roles and Features wizard, you can also run the following command from a Command Prompt (update Z:\ to the appropriate drive letter where the Windows Server DVD is inserted or mounted:
DSIM /online /enable-feature /featurename:netfx3 /all /source:Z:\Sources\sxs

Once the .NET Framework 3.5 feature is enabled, you will no longer get the aforementioned error message and SQL Server 2012 installation will proceed.

You should not experience this issue if you check the box to have the SQL Server 2012 installer Include SQL Server product updates.  Note that this check-box only updates the setup files, it will not automatically slipstream any service packs.