Installing .Net 3.5 on Windows 2012 R2

Solution 1:

The command I use to install .NET Framework 3.5 on Windows 8.1 and Server 2012 R2 is:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs

Where D:\ is the mounted ISO or DVD drive. The only difference from yours is the /LimitAccess, but I believe that is the important part, as it prevents it from attempting to contact Windows Update or WSUS. For whatever reason, this aspect (contacting Windows Update) is totally broken for .NET Framework 3.5 on Windows 8/8.1 and Server 2012/2012R2 and will always cause it to fail.

See also: http://blogs.technet.com/b/askcore/archive/2012/05/14/windows-8-and-net-framework-3-5.aspx

Solution 2:

I had the same issue when I mount the Windows install disk or use the physical DVD, and here's how I fixed it:

  1. Create a folder under root (C:\NetFx3 for example)
  2. Copy the microsoft-windows-netfx3-ondemand-package.cab from a Windows install disk .\sources\sxs to the C:\NetFx3 folder
  3. Command Prompt as an administrator
  4. DISM.exe /online /enable-feature /featurename:NetFX3 /All /Source:C:\NetFX3 /LimitAccess
  5. The text progress bar will go to 100% when completed and will give you a message: "The operation completed successfully".

For whatever reason, my optical drive shows the files on the disk, but the DISM doesn't like it, but copying the files to C: seems to have worked.