Tuesday, April 14, 2015

Installing .NET Framework 3.5 during Task Sequence

Have you ever tried enabling .NET Framework during OS deployment in a Task Sequence? Instaling Windows 8.1 this should be enabled easily by running the following command line:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All

However, it's not as easy as it looks. This task often fails with error 0x800f081f during TS deployment. Also if you try to install .NET Framework offline by mounting the image it fails with the same error, see below.



Searching around I found out that 2 packages are prohibiting the .NET Framework action from succeeding. Package KB2966826 and KB2966826 are both integrated in the default Windows 8.1 installation.

Solution:
To enable .NET Framework in the first place both packages should be removed. These actions can be run as Command Line action in the Task Sequence.

Uninstall KB2966826
  • DISM /Online /Remove-Package /PackageName:Package_for_KB2966826~31bf3856ad364e35~amd64~~6.3.1.7 /quiet /norestart

Uninstall KB2966828
  • DISM /Online /Remove-Package /PackageName:Package_for_KB2966828~31bf3856ad364e35~amd64~~6.3.1.4 /quiet /norestart

After removing the packages, the .NET Framework feature can be installed succesfully using the comand line below.
  • DISM /Online /Enable-Feature /FeatureName:NetFx3 /All

The KB updates can be installed afterwards using the Software Updates step. These actions can be run in the Build and Capture phase, so .NET is available in every deployment.