I was recently attempting to install the .NET Framework 3.5 features on a Windows Server 2012 R2 instance, where this would fail with the below error message:
As the binaries are on demand and therefore not included the installation adding the features will attempt to contact Windows Update to retrieve the files required.
In my environment both access to Windows Update is restricted and instances are managed by a central WSUS server.
In order to resolve this issue, you will need to specify an alternative path to the \Sources\sxs folder on the installation media to complete the installation. For Example, E:\Sources\sxs or \\Server\Share\sxs.
Alternatively, you can configure group policy object settings to enable the alternative path and disable downloading of payload from Windows Update.
Setting: Computer Configuration\Administrative Templates\System\Specify settings for optional component installation and component repair
Configuration: Enabled
Alternative source file path: E:\Sources\sxs
Never attempt to download payload from Windows Update = Enabled