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 .