Windows – Can’t add .NET3.5 to Windows 8.1 using DISM

dismwindows 8

The same command line that works fine on Windows 8 PCs doesn't work on Windows 8.1 PCs.

DISM.exe /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:C:\Users\Admin\Desktop\sxs

Which is where I copied the sxs folder to.

But according to Microsoft it should work on both 8 and 8.1. The progress bar stops at 65.8% with error: 0x800f0081f.

The source file could not be found.

But it definitely is at that location – copy and pasted to the address bar and it is there. I have a need to install .NET 3.5 this way to support offline installation of a .NET program, so the Control Panel – Windows Features method isn't an option for me.

I've made the logs available for analysis. It seems that DISM on Windows 8.1 doesn't understand the /featurename:NetFx3 option, since the DISM.log has the line

Encountered an unknown option "featurename" with value "NetFx3" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine

Best Answer

The files in the SXS folder have to be the right ones for that version of Windows. It will not work with an SXS folder from the 8.0 disk when the PC has been upgraded to 8.1, then you need the SXS folder from an 8.1 disk. I didn't find this made clear anywhere in documentation and the error message "The source file could not be found" is at best misleading. However, the clue (if you already know the information below) is in the CBS log where the message about a file with a 6.3.9600 name is shown, since no files in an SXS folder from Windows 8.0 have such a filename.

How to determine if your SXS folder is for Windows 8.0 or 8.1

Almost all the folders in the SXS folder for Windows 8.0 contain the string "6.2.9200" in their foldername. Almost all the folders in the SXS folder for Windows 8.1 contain the string "6.3.9600" in their foldername. There are no cases of the string from one version being in any foldername of the other version.