After mulitple tries at getting error code 0x800F081F when trying to install .NET Framework 3.5 (and downloading the associated files for 2.0 and 3.0) on Windows 10, I was finally able to get it working.
Go into RegEdit and locate the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU folder. Double click on UseWUServer(UseWindowsUpdateServer) and change the value to 0. If the value is already 0 this fix may not work for you. I had to reboot and then try to install .Net again, then it worked.