All Products
Search
Document Center

Elastic Compute Service:What do I do if .NET Framework 3.5 or a language pack cannot be installed on a Windows instance?

Last Updated:Dec 10, 2024

By default, Windows Elastic Compute Service (ECS) instances use Windows Server Update Services (WSUS) as the update source. This may cause .NET Framework and language pack installation files to be missing. As a result, the system may report an error, which indicates that the system fails to find the source files or install the language pack. This topic describes how to resolve the preceding issue by changing the update source of a Windows instance from WSUS to Windows Update.

Important
  • This topic applies to Windows Server 2012 R2, Windows Server 2016, and Windows Server 2019 operating systems.

  • If your instance runs Windows Server 2012 R2 and uses a Windows official image released after June 2023, you cannot install .NET Framework 3.5 in the operating system because a specific security patch is installed in the image. For information about the solution of this issue, see the .NET Framework 3.5 fails to be installed in Windows Server 2012 R2 section of the "Known issues of public images" topic.

  • If you still want to use the Windows Server 2012 R2 operating system, we recommend that you create ECS instances in the ECS console by using one of the following Windows Server 2012 R2 community images that have .NET Framework 3.5 installed: win2012r2_9600_x64_dtc_zh-cn_40G_.Net3.5_alibase_20231204.vhd and win2012r2_9600_x64_dtc_en-us_40G_.Net3.5_alibase_20231204.vhd. For information about how to find the image that you need, see Find an image.

Problem description

  • Issue 1: A .NET Framework error is reported, indicating that the source files cannot be found.

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

    找不到源文件

  • 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 Windows instance uses WSUS as the update source. However, the WSUS server does not provide updates for .NET Framework 3.5 or the language packs. The Windows instance cannot obtain the corresponding updates from the WSUS server. As a result, the preceding issues occur because the installation files of .NET Framework and language packs do not exist on the instance.

Solution

  1. Connect to the Windows instance.

    For more information, see Use Workbench to connect to a Windows instance over RDP.

  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. To install .NET Framework 3.5, use one of the following methods.

    Note

    The memory usage of the Windows Server 2012 or Windows Server 2016 operating system is high. If you install other applications in the operating system, memory usage continues to increase and memory becomes insufficient, which may cause a failure to install .NET Framework. To prevent the issue, we recommend that you add physical memory. If an I/O optimized instance is used, high disk I/O performance is ensured, which achieves faster data reads from and writes to virtual memory than other instances. We recommend that you configure the Windows virtual memory for the I/O optimized instance. For more information, see How do I configure the virtual memory of a Windows instance?

    Use Server Manager

    1. In the Server Manager window, click Add roles and features.

    2. Follow the wizard default configuration, click Features in the left-side navigation pane, and then select .NET Framework 3.5 Features.

      image

      Follow the wizard to confirm the settings until the installation is complete.

      image

    Run PowerShell commands

    You can run one of the following commands:

    • Dism /Online /Enable-Feature /FeatureName:NetFX3 /All 

      image.png

    • Install-WindowsFeature -Name NET-Framework-Features

      image.png

    Important

    If the system reports an error such as 0x800F0906 or 0x800F081F as shown in the following figure, fix the error. For more information, see .NET Framework 3.5 installation errors: 0x800F0906, 0x800F081F, 0x800F0907, 0x800F0922.

    image

  6. (Conditionally required) If your Windows environment requires WSUS-based updates, run the following commands to configure WSUS as the update source:

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

References

  • .NET Framework 3.5 is a software development framework provided by Microsoft. It contains the core class libraries and runtime environments that are required for developing and running .NET Framework-based applications. The language packs of .NET Framework 3.5 are add-ons that work with the framework to support multiple languages. For more information, see Overview of .NET Framework.

  • For information about how to install a version of .NET Framework in other Windows Server versions, see Installation guide.