Skip to content

Clarify ensureDotnetDependencies arguments & fix script #2730

Open
nagilson wants to merge 13 commits into
dotnet:mainfrom
nagilson:nagilson-fix-icu-and-ensure-deps-doc
Open

Clarify ensureDotnetDependencies arguments & fix script #2730
nagilson wants to merge 13 commits into
dotnet:mainfrom
nagilson:nagilson-fix-icu-and-ensure-deps-doc

Conversation

@nagilson

@nagilson nagilson commented Jun 18, 2026

Copy link
Copy Markdown
Member

Resolves #2728

ensureDotnetDependencies is a legacy, unsupported command. However, this aims to improve the command functionality to support first party teams until a better solution is implemented.

To test, you'd need to download and package/run the sample extension and vscode extension on a ubuntu image without libicu installed, then run sample: run a hello world app command and follow the prompts to install libicu and see that it now works whereas before it did not.

I tried this out myself and it seems to work now.

image image image

Fixes

  • Document that the legacy dotnet.ensureDotnetDependencies command is intended to probe a specific dotnet DLL payload.

  • Update the script to find newer versions of libicu and also provide a failure code instead of no information upon failure.

  • Update the script to call the correct function to check dependencies as it was actually calling an undefined function so it didn't work a lot of the time.

  • Update IDotnetEnsureDependenciesContext to include string[] alongside the previously published SpawnSyncOptionsWithStringEncoding shape. This is not a breaking change because string[] is the runtime behavior existing callers already use today and the arguments were incorrect previously.

  • Updates the test hello world app to net10 instead of netframework2.2 for hygiene and sanity to make sure dotnet still exits the same way if it fails to load a dependency.

  • Adds some less than ideal but functional tests to try to prevent regression of the script.

Document that the legacy dotnet.ensureDotnetDependencies command is intended to probe a specific dotnet DLL payload, matching the C# extension language server usage.

Update IDotnetEnsureDependenciesContext to include string[] alongside the previously published SpawnSyncOptionsWithStringEncoding shape. This is not a breaking change because string[] is the runtime behavior existing callers already use today.

Add focused functional coverage for the --info signal path and the DLL payload path.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies the intended contract for the legacy dotnet.ensureDotnetDependencies command (probing a specific .NET DLL payload), updates the published context type to match existing runtime usage, and adjusts Linux dependency installation behavior and coverage.

Changes:

  • Expand IDotnetEnsureDependenciesContext.arguments to accept string[] in addition to SpawnSyncOptionsWithStringEncoding.
  • Update the Linux prereqs install script (additional deps check + Debian libicu package pattern) and add a focused unit test for the Debian path.
  • Add functional tests covering the --info dependency-signal path and the “DLL payload starts” path; update command documentation accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vscode-dotnet-runtime-library/src/test/unit/LinuxPrereqsInstallerScript.test.ts Adds unit coverage for Debian prereqs installation behavior (incl. libicu pattern).
vscode-dotnet-runtime-library/src/IDotnetEnsureDependenciesContext.ts Publishes arguments as `string[]
vscode-dotnet-runtime-library/install scripts/install-linux-prereqs.sh Fixes additional-deps string check and updates Debian libicu install pattern.
vscode-dotnet-runtime-extension/src/test/functional/DotnetCoreAcquisitionExtension.test.ts Adds functional tests for dotnet.ensureDotnetDependencies prompt/no-prompt scenarios.
vscode-dotnet-runtime-extension/src/extension.ts Updates ensureDotnetDependencies handler to handle the new union type.
Documentation/commands.md Documents the intended probe shape and clarifies arguments typing/behavior.

Comment thread vscode-dotnet-runtime-extension/src/extension.ts Outdated
@nagilson nagilson marked this pull request as ready for review June 19, 2026 18:20
Copilot AI review requested due to automatic review settings June 19, 2026 18:20
Comment thread Documentation/commands.md Outdated
Comment thread Documentation/commands.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 15 changed files in this pull request and generated 3 comments.

Comment thread sample/src/extension.ts Outdated
Comment thread vscode-dotnet-runtime-library/install scripts/install-linux-prereqs.sh Outdated
Comment thread vscode-dotnet-runtime-extension/src/extension.ts Outdated
Copilot AI review requested due to automatic review settings June 19, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 15 changed files in this pull request and generated 6 comments.

Comment thread vscode-dotnet-runtime-extension/src/extension.ts Outdated
Comment thread sample/src/extension.ts
Comment thread vscode-dotnet-runtime-library/src/Acquisition/DotnetCoreDependencyInstaller.ts Outdated
Copilot AI review requested due to automatic review settings June 19, 2026 18:32
@nagilson nagilson changed the title Clarify ensureDotnetDependencies arguments Clarify ensureDotnetDependencies arguments & fix script Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 15 changed files in this pull request and generated 2 comments.

Comment thread vscode-dotnet-runtime-library/src/Acquisition/DotnetCoreDependencyInstaller.ts Outdated
Comment thread vscode-dotnet-runtime-library/install scripts/install-linux-prereqs.sh Outdated
Copilot AI review requested due to automatic review settings June 19, 2026 18:41
@nagilson nagilson requested a review from a team June 19, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 15 changed files in this pull request and generated 4 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet.ensureDotnetDependencies does not install libicu dependencies on Linux WSL

2 participants