Skip to content

dotnet.ensureDotnetDependencies does not install libicu dependencies on Linux WSL #2728

Description

@Cosifne

Summary

dotnet.ensureDotnetDependencies does not appear to install the required libicu dependencies correctly on Linux under WSL. After invoking the command against the acquired .NET executable, running dotnet --info still fails with the missing ICU dependency error.

Repro steps

On Ubuntu using WSL, acquire .NET with the extension, then run:

await vscode.commands.executeCommand('dotnet.ensureDotnetDependencies', {
    command: acquireResult.dotnetPath,
    arguments: ['--info']
});

Then run:

/home/shech/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/dotnet --info

Expected behavior

The dependency installer restores/installs the required Linux dependencies, including libicu, so the acquired .NET executable can run successfully.

Actual behavior

The dependency installation flow reports a failure, and dotnet --info still fails because ICU is missing:

Process terminated.
Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
 at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
 at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
 at System.Environment.FailFast(System.String)
 at System.Globalization.GlobalizationMode+Settings..cctor()
 at System.Globalization.CultureData.CreateCultureWithInvariantData()
 at System.Globalization.CultureData.get_Invariant()
 at System.Globalization.TextInfo..cctor()
 at System.String.ToLowerInvariant()
 at System.Text.EncodingHelper.GetEncodingFromCharset()
 at System.ConsolePal.GetConsoleEncoding()
 at System.Console.get_OutputEncoding()
 at Microsoft.DotNet.Cli.AutomaticEncodingRestorer..ctor()
 at Microsoft.DotNet.Cli.Program.Main(System.String[])
Aborted /home/shech/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/dotnet --info

The extension notification first says:

Failed to run .NET runtime. You may be missing key Linux libraries. Install them now?

After choosing install, it reports:

The dependency installer failed. Try installing dependencies manually.

Environment

  • Extension: ms-dotnettools.vscode-dotnet-runtime version 3.1.0
  • OS: Linux x64 under WSL2
  • Kernel: Linux CPC-shech-BS4DQ 6.6.114.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Mon Dec 1 20:46:23 UTC 2025 x86_64 GNU/Linux
  • VS Code:
    • Version: 1.124.0
    • Commit: 1b50d58d73426c9171299ec4037d01365d995b78
    • Date: 2026-06-09T21:29:32-07:00
    • Electron: 42.2.0
    • ElectronBuildId: 14159160
    • Chromium: 148.0.7778.97
    • Node.js: 24.15.0
    • V8: 14.8.178.14-electron.0
    • OS: Linux x64 6.6.114.1-microsoft-standard-WSL2 snap

Additional context

Screenshots show the extension prompts:

  1. Failed to run .NET runtime. You may be missing key Linux libraries. Install them now?
  2. The dependency installer failed. Try installing dependencies manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions