Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.

Overview

This article mainly introduces how to correctly install .NET Framework 3.5 SP1 on Windows operating system.

Detail

When you are prompted that the source files are unavailable for installing .NET Framework 3.5 SP1 by using other installation methods such as Server Manager, you can refer to this document to install .NET Framework 3.5 SP1 by command.

Note:
  • The PowerShell commands described in this topic can all be deployed through the Cloud Assistant. For more information, see Cloud Assistant.
  • If you want to automatically install the. NET Framework 3.5 by running PowerShell commands during instance creation, we recommend that you use the instance user data together. For more information, see user data.

Windows Server 2012 and later operating systems use FOD(Feature on Demand), you must download the installation source from Windows Update. As WSUS(Windows Server Update Services) is used by Windows instances by default to obtain Update sources, the installation files of the . Netframework and language package are missing. Therefore, the error is not found. Please refer to the following steps to install the .NET Framework 3.5 SP1:

  1. Open the CMD utility as an administrator, and run powershellto switch to the interactive mode.
  2. Run the following command to modify the registry to set the Update source to Windows Update.
    $ServicingPolicy = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Servicing"
    New-Item $ServicingPolicy -Force New-ItemProperty -Path $ServicingPolicy -Name RepairContentServerSource -PropertyType DWord -Value 2 -Force New-ItemProperty -Path $ServicingPolicy -Name LocalSourcePath -PropertyType ExpandString -Force
  3. Run the following command to enable .NET Framework 3.5.
    Import-Module Servermanager Add-WindowsFeature Net-Framework-Core

Application scope

  • ECS