且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Windows Server Core Docker 上安装 .NET Framework 3.5

更新时间:2023-02-11 13:28:19

I took the following steps to resolve this issue:

  1. Got hold of the Windows Server 2016 Core ISO file. Mounted the file on local computer.
  2. Extracted the {mount}:/sources/sxs folder into a zip file (sxs.zip). Ensure that the .NET Framework 3.5 cab file (microsoft-windows-netfx3-ondemand-package.cab) is present in the sxs folder. In my case, this was the only file present in the sxs folder.

  1. Copy the sxs.zip file to my container. I copied it using the dockerfile of the image.
  2. Unzip the file to C:sourcessxs folder in the container.
  3. Used the Install-WindowsFeature powershell command to install the feature.

    Install-WindowsFeature -Name NET-Framework-Features -Source C:sourcessxs -Verbose
    

Hope this helps. I also found the following blog useful in understanding the on-demand features. https://blogs.technet.microsoft.com/askcore/2012/05/14/windows-8-and-net-framework-3-5/