All Products
Search
Document Center

:What do I do if .NET Framework 3.5.1 or a language pack cannot be installed on a Windows instance?

Last Updated:Jan 24, 2024

By default, Windows Elastic Compute Service (ECS) instances use Windows Server Update Services (WSUS) to obtain update sources. This may cause .NET Framework and language pack installation files to be missing. As a result, a failure to find the source file or install the language pack may be reported. This topic describes how to resolve the issue by changing the update source of a Windows instance from WSUS to Windows Update.

Problem description

  • Issue 1: An error is reported for .NET Framework, which indicates that the source files cannot be found.

    When you install .NET Framework 3.5.1 on an instance that runs Windows Server 2012 R2, Windows Server 2016, or Windows Server 2019, an error is reported, as shown in the following figure.

    找不到源文件

  • Issue 2: A language pack cannot be installed on a Windows instance.

    When you switch languages in the Control Panel or search for languages in the Windows Update window, you cannot select or install language packs.

    无法安装语言包

Cause

The preceding issues occur because Windows instances use WSUS as the update source and the installation files of .NET Framework and language packs do not exist on the instances.

Solution

  1. Connect to the Windows instance.

    For more information, see Connect to a Windows instance by using a password.

  2. Start Command Prompt.

  3. Enter powershell to access the PowerShell interactive interface.

  4. Run the following commands to configure Windows Update as the update source in the registry:

    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 0
    Restart-Service -Name wuauserv
  5. Run the following command to install .NET Framework by using PowerShell:

    Install-WindowsFeature Net-Framework-Core
    Note
    • Windows Server 2012 and Windows Server 2016 have high memory usage, and memory usage significantly increases when multiple applications are installed. In this case, the issue that .NET Framework cannot be installed due to insufficient memory may occur. To resolve the issue, we recommend that you increase the amount of physical memory. For example, if you use an I/O optimized instance, you can enable the virtual memory based on your business requirements. For more information, see How to configure the virtual memory of a Windows instance.

    • .NET Framework 3.5 cannot be installed on a Windows Server 2012 R2 image after you install the KB5027141 patch that was released in June 2023, the KB5028872 patch that was released in July 2023, the KB5028970 patch that was released in August 2023, or the KB5029915 patch that was released in September 2023. For more information, see the Failed to install Windows Server 2012 R2 .NET Framework 3.5 section in the "Known issues" topic.

    • If error codes such as 0x800F081F and 0x800F0906 are reported when you install .NET Framework 3.5, see .NET Framework 3.5 installation errors: 0x800F0906, 0x800F081F, 0x800F0907, 0x800F0922 for troubleshooting.

  6. (Optional) Run the following commands to reset the update source to WSUS:

    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 1
    Restart-Service -Name wuauserv