Installing .NET Framework 3.5 in Windows 8 and in Windows Server 2012
I was installing SQL Server 2012 on Windows Server 2012, and everything seemed perfect. Although checking the prerequisites completed successfully, the installer displayed a warning popup in the middle of the setup about the required but missing .NET Framework 3.5. Because the dialog had only an OK button, I could only hope that .NET 4.5 which comes with the OS will be suitable for SQL Server. It wasn’t, and the installation failed. And it turned out, that installing .NET Framework 3.5 is not so easy in these new operating systems.
In Windows 8 and in Windows Server 2012, the .NET Framework 3.5 is a so-called Feature on Demand. This means, that the metadata for the feature is included in Windows 8 and in Windows Server 2012, but the binaries and other files associated with the feature are not included. And if you want to install the feature, you have to supply the files.
In Windows 8 open the Programs and Features dialog. For me the easiest way to access this dialog is via the Windows+X admin menu:
Select .NET Framework 3.5 (includes .NET 2.0 and 3.0) then click OK. A little searching…
…and a question, whether you really want to download the files from Windows Update:
Maybe it’s just me, but I really miss the info about the size of the download, and the option to supply the files locally. So if you really want .NET 3.5, click Download files from Windows Update. A little downloading…
… then if you are not so lucky (like me), this error screen:
The Tell me how to solve this problem link is exceptionally useful, because it links to the KB2734782 Knowledge Base article (Error codes when you try to install the .NET Framework 3.5 in Windows 8 or in Windows Server 2012) which can really help. In my case the problem was that my computer is a domain member, and group policy centrally configures the Windows Update settings. As I couldn’t change the policy, I had no other option than installing the .NET Framework from command line. Luckily the installation files are on the Windows 8 installation media, and with this short command you can install it from there:
dism /online /enable-feature /featurename:NetFx3 /All /Source:D:\sources\sxs /LimitAccess
It completes in a few seconds, I guess it’s much faster, than from Windows Update:
Windows Server 2012
The command line installation using dism works perfectly on Windows Server 2012 too, because the installation files are available also on the server installation media. Ironically, on the server, you can complete the installation on the GUI as well. Just start the Add Roles and Features Wizard and select the .NET Framework 3.5 Features option (click for larger image):
After the Next, just try to read the endless warning message:
The message tries to warn you to click the Specify an alternate source path link at the bottom:
Then enter the path of the source files, like D:\Sources\SxS:
That’s it. After you finish the wizard, SQL Server 2012 installs without any issue.