This solution should work for all devices whether its a Desktop PC, laptop or Surface tablet running on Windows 8, Windows 8.1 or Windows 10 operating systems.
If you are also facing problems while installing .NET Framework 3.5 in Windows 8 or later, check out following method to fix the issue:
1. Type gpedit.msc in RUN or Start search box and press Enter. It'll open Group Policy Editor.
2. Now go to:
Computer Configuration -> Administrative Templates -> System
3. In right-side pane, look for "Specify settings for optional component installation and component repair" option.
4. The option would be set to Not Configured. Double-click on it, set it to Enabled and enable "Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS)" option.