One of the Prerequisites of SharePoint 2013 is the .NET Framework 4.5. I have been installing countless SharePoint 2013 environments without issues but recently, I started noticing that the SharePoint installer fails with the following error :
Setup is unable to proceed due to the following error(s):
This product requires Microsoft .NET Framework 4.5.
This might seem strange since the prerequisite installer installed everything. When this happens, you might want to have a look at the actual installed versions of the .NET Framework. You will probably notice that .NET Framework 4.6 or higher is installed. To check which versions have been installed, you can download the .NET Framework Setup Verification Utility from Microsoft to verify which versions of the .NET Framework have been installed. When you run this tool, you will see an overview of all installed versions.
When you see the .NET Framework 4.6 or 4.6.1 listed, the SharePoint installer cannot detect the presence of version 4.5.
With the release of Service Pack 1 for SharePoint 2013, SharePoint is compatible with version 4.6 but the installer isn’t. You can have version 4.6, but only AFTER you installed SharePoint 2013.
So, in order to get SharePoint installed on that machine, you need to uninstall version 4.6 or higher before you can install SharePoint 2013. And this is where it gets a bit annoying. The tool to verify the .NET Framework also has the ability to uninstall a version. Except… this doesn’t work! You can try it but nothing happens. When you recheck, it’s still there. Even after a reboot.
This version of the .NET Framework can be uninstalled by uninstalling Windows update KB3102467. But this is just the first action… if you are installing SharePoint in an organization which pushes Windows Updates, you probably want to block this framework from installing on that machine for the time being.
To do that, you can execute the following PowerShell script. This is going to add a key ‘BlockNetFramework461’ to the registry and set it to 1 to block the installation of that version. Once SharePoint is installed, you can remove this key if you want.
$Path = 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\WU'
$Property = 'BlockNetFramework461'
$KeyExists = Test-Path $Path
New-Item -Path $Path
$PropExists = Get-ItemProperty -Path $Path -Name $Property -EA SilentlyContinue
New-ItemProperty -Path $Path -Name $Property -PropertyType Dword -Value 1
To see the official article for the blocking of the installation of the .NET Framework 4.6.1, see the following link:
Once that version is uninstalled, you can proceed with the installation of SharePoint 2013 on that machine.
Microsoft released a fix for the installer issue. You can find this fix in KB3087184.