Skip to content

Implement the external-tool downloader for the dotnet nano umbrella #1801

Description

@danielmeza

Description

The dotnet nano umbrella tool wraps external prebuilt tools (today nanoff) and resolves them in a defined order: a binary bundled in the tool package, then a globally/locally installed tool or one on PATH, then a download of a pinned release to a user cache (verified by version/hash). The third step — the downloader — is not implemented: when nothing resolves, dotnet nano flash currently fails with a clear "install nanoff" message instead of fetching the pinned release described in the embedded nano-tools.json manifest. Implementing the downloader makes the toolchain a single install with deterministic, CI-reproducible external-tool provisioning.

How to solve the problem

Implement the IToolDownloader step in the external-tool resolver:

  • Fetch the pinned release for an external tool from the source declared in nano-tools.json (for nanoff, the pinned NuGet package version), into a per-user cache.
  • Verify the download by version and hash before use; reuse the cached copy on subsequent runs.
  • Wire it into ExternalToolResolver so resolution falls through to download when the bundled/installed/PATH lookups miss, and surface clear progress/errors.

Acceptance: with nanoff neither bundled, installed, nor on PATH, dotnet nano flash downloads the pinned nanoff release to the cache (verified by version/hash), runs it, and reuses the cache on later runs.

Describe alternatives you've considered

  • Keep the current behavior (fail with an "install nanoff" message). Acceptable as a stopgap, but it means the umbrella tool is not a single self-provisioning install, which is the stated goal of the external-tool layer.
  • Require nanoff as a hard prerequisite. Pushes provisioning onto the user and CI; the pinned-download model is deterministic and reproducible.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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