Skip to content

Support explicit system-wide .NET runtime installation for extension clients #2781

Description

@JakeRadMSFT

Motivation

C# Dev Kit Workspace Requirements discovers target framework requirements only after restore/design-time build and needs to remediate missing target runtime bands without installing a full SDK or using a private extension root.

Existing Behavior

Currently, local dotnet.acquire and global dotnet.acquireGlobalSDK exist, but there is no system-wide runtime/ASP.NET Core API.

Proposed API

We propose a new dotnet.acquireGlobalRuntime command accepting the existing IDotnetAcquireContext object:

  • Required parameters: version, requestingExtensionId, installType: 'global', and a mode specifying either runtime or aspnetcore.
  • Return type: IDotnetAcquireResult.

This is explicitly opt-in by the calling extension and does not change any default/local acquisition behaviors.

Compatibility & Security

  • Preserve all existing APIs.
  • Use official installers.
  • Utilize existing elevation/hash/domain checks.
  • Platform behavior is consistent with global SDK acquisition.

Acceptance Criteria

  • Acceptance criteria for Windows/macOS/Linux where supported.
  • Release metadata resolution for runtime and aspnetcore.
  • Unit/integration tests.
  • Command documentation and code sample.

I intend to update WIP PR #2573 to implement it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions