Windows Server 2012 R2 – Uninstalling .Net Framework 4.6, 4.6.1, 4.6.2, 4.7, 4.71
Some application installers require specific versions of .Net to be used to successfully complete installation. One such application is SharePoint Foundations 2013 SP1 that requires the .Net Framework 4.5. Later versions of .Net Framework 4.6 and higher must be removed and the machine restarted for the installation to succeed.
I should also note that this information is destined to become stale as subsequent updates and versions of .Net are released by Microsoft. Please feel free to post updates as responses to this post.
Temporarily Disable Windows Updates:
The Windows Update service will need to be temporarily disabled on the server to prevent removed updates from being downloaded and reinstalled prior to installation. Once the software installation is completed, Windows Updates can be re-enabled.
Launch Server Manager
Select Local Server
Adjacent to Windows Update select the link to access the Windows Update settings page.
Select Change Settings
Select Never Check for updates (not recommended)
Close the Windows Update window
Exit Server Manager
Uninstall all KBs associated with .Net 4.6 and higher:
I found that uninstalling the .Net 4.6 and higher updates was enough to complete a successful installation of SharePoint Foundation 2013 SP1. This may not be the case for all software installations.
Select Start, Control Panel
In the Search Panel enter Add or Remove Programs
Launch the Add and Remove Programs link
Select View Installed Updates
Tip: In the search window, enter KB and the first three numbers of those listed below to simplify locating the KBs installed on your server.
Remove the following KBs if they exist and select Restart Later.
KB4096417 - (.Net Framework 4.6, 4.61, 4.62, 4.7, 4.7.1)
KB4054980 - (.Net Framework 4.6, 4.61, 4.62, 4.7, 4.7.1)
KB4055001 - (.Net Framework 4.6, 4.61, 4.62, 4.7, 4.7.1)
KB4041777 - (.Net Framework 4.6, 4.61, 4.62, 4.7)
KB4040972 - (.Net Framework 4.6, 4.61, 4.62, 4.7)
KB4054854 - (.Net Framework 4.7.1)
KB4033369 - (.Net Framework 4.7)
KB3186539 - (.Net Framework 4.7)
KB3102439 - (.Net Framework 4.6.1)
KB3045562 - (.Net Framework 4.6)
KB3045563 - (.Net Framework 4.6)
KB3102467 - (.Net Framework 4.6.1)
Once all KBs have been removed, restart the system.