Skip to content

Ship Aspire CLI as a NativeAOT dotnet tool - #16496

Merged
Ankit Jain (radical) merged 22 commits into
microsoft:mainfrom
radical:dotnet-tool-naot-bundle
Apr 29, 2026
Merged

Ankit Jain (radical) merged 22 commits into
microsoft:mainfrom
radical:dotnet-tool-naot-bundle

Conversation

@radical

@radical Ankit Jain (radical) commented Apr 27, 2026 •

Copy link
Copy Markdown
Member

Description

Ships the Aspire CLI as a NativeAOT dotnet tool while preserving the existing native archive distribution path.

This change:

  • Packs RID-specific Aspire.Cli. tool packages from the signed NativeAOT CLI binary.
  • Packs the Aspire.Cli pointer package used by dotnet tool install.
  • Extracts the tool payload from the produced native archive so the dotnet tool package contains the same signed binary as the archive.
  • Wires GitHub Actions and AzDO native CLI packaging flows to produce, upload, and verify the dotnet tool nupkgs alongside the native archives.
  • Adds NativeAOT reflection annotations needed by the CLI/type-system path.
  • Detects when the CLI is running from the .NET tool store so update guidance uses dotnet tool update -g Aspire.Cli.
  • Shares CLI package discovery logic across E2E/deployment tests so pointer packages are distinguished from RID-specific packages.

Automated verification added:

  • Verifies exactly one RID-specific CLI tool package and one Aspire.Cli pointer package are produced.
  • Verifies RID packages contain the NativeAOT binary at the expected tools/net10.0/<rid>/aspire path.
  • Verifies the RID package binary matches the binary in the native CLI archive.
  • Verifies RID packages do not contain managed publish artifacts such as .dll, .deps.json, or .runtimeconfig.json.
  • Verifies pointer packages do not contain native binaries.
  • Verifies pointer package DotnetToolSettings.xml references the expected RID-specific package.
  • Keeps CLI archive execution verification in place for compatible host/target RID combinations.

Test scenarios added:

  • Dotnet tool smoke coverage installs Aspire.Cli via dotnet tool install, verifies dotnet tool list, resolves aspire from the dotnet tools path, checks aspire update --self recommends dotnet tool update, verifies the installed version, creates a starter project, and runs it.
  • CLI install strategy coverage detects dotnet tool sources from environment variables, infers versions from pointer packages, mounts local nupkg sources into Docker, formats dotnet tool install commands, ignores RID-specific packages when discovering pointer packages, and errors on ambiguous/missing pointer package layouts.
  • Dotnet tool detection coverage recognizes Aspire CLI shim/tool-store paths and rejects non-Aspire, wrong RID, wrong TFM, wrong binary, and standalone archive paths.
  • Update command/notifier coverage uses dotnet tool update -g Aspire.Cli for tool-store installs while preserving aspire update guidance for standalone archive installs.

Validation broadly covered targeted CLI unit tests, CLI E2E dotnet-tool scenarios, package layout verification, local dotnet-tool install smoke testing, and the relevant GitHub Actions/AzDO native archive and package validation flows.

Follow-up tasks

Follow-up work for the NativeAOT dotnet-tool path is tracked in #16542.

Known follow-ups include:

@github-actions

github-actions Bot commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16496

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16496"

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 3 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (2 tests)
  • Aspire.Cli.EndToEnd.Tests.CentralPackageManagementTests.AspireAddPackageVersionToDirectoryPackagesProps — MCR registry rate limiting (HTTP 403)
  • Aspire.Cli.EndToEnd.Tests.CentralPackageManagementTests.AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps — MCR registry rate limiting (HTTP 403)

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Ankit Jain (radical) and others added 7 commits April 28, 2026 10:41
Add shared detection for Aspire CLI installations that run from dotnet tool shims, the tool store, or RID-specific NativeAOT tool packages.

Co-authored-by: Copilot <[email protected]>
Introduce a shared helper for locating Aspire CLI pointer and RID-specific packages, and link it into deployment end-to-end tests for reuse.

Co-authored-by: Copilot <[email protected]>
Update the CLI tool project so clipack can pack one RID-specific tool package at a time from a staged prebuilt NativeAOT binary instead of publishing the managed tool directly.

Co-authored-by: Copilot <[email protected]>
Route update notifications and self-update guidance through the shared dotnet tool detection helper so NativeAOT tool installations get the correct messaging.

Co-authored-by: Copilot <[email protected]>
Wire clipack and after-signing targets so RID-specific and pointer dotnet tool packages are packed from the signed native CLI archives.

Co-authored-by: Copilot <[email protected]>
Preserve interface metadata on CLR type references used by hosting type helpers so the NativeAOT CLI can safely perform resource type checks.

Co-authored-by: Copilot <[email protected]>
Add tool package verification scripts, wire native CLI package validation into CI and AzDO pipelines, and update E2E install strategy coverage for RID-specific packages.

Co-authored-by: Copilot <[email protected]>
@radical Ankit Jain (radical) changed the title Add NativeAOT CLI dotnet tool packaging Ship Aspire CLI as a NativeAOT dotnet tool Apr 28, 2026
Ensure CLI dotnet tool packages produced after native archive signing are NuGet-signed before publishing, and require signature verification in the native package validation step.

Co-authored-by: Copilot <[email protected]>

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 updates Aspire’s CLI distribution so the NativeAOT aspire binary is shipped both as the existing signed RID-specific archives and as a dotnet tool (pointer package + RID-specific tool packages), with CI/CD wiring and verification to keep the payload identical between the archive and tool nupkg.

Changes:

  • Adds shared CLI tool package discovery/version inference for tests and updates E2E flows to support local nupkg sources without requiring an explicit version.
  • Introduces robust “running as a NativeAOT dotnet tool” detection and updates CLI update guidance (dotnet tool update -g Aspire.Cli vs aspire update / archive self-update behavior).
  • Adds build/sign/verify automation for the new tool nupkgs (scripts + AzDO/GitHub Actions + clipack packing targets) and adds NativeAOT reflection annotations in the type system path.

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Shared/CliPackageDiscovery.cs New shared helper to locate the Aspire.Cli pointer nupkg and validate extracted versions.
tests/Shared/CliInstallStrategy.cs Uses shared package discovery; supports dotnet-tool local source version inference and sets expected version for dotnet tool installs.
tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj Links new shared CliPackageDiscovery into deployment E2E tests.
tests/Aspire.Cli.Tests/Utils/DotNetToolDetectionTests.cs New unit tests validating dotnet-tool (shim + tool store) path detection.
tests/Aspire.Cli.Tests/Utils/CliUpdateNotificationServiceTests.cs Verifies update notifier emits dotnet tool update guidance when running from tool store.
tests/Aspire.Cli.Tests/TestServices/TestInteractionService.cs Captures last update command + plain text output for assertions in new tests.
tests/Aspire.Cli.Tests/Commands/UpdateCommandTests.cs Adds coverage for update --self messaging and “no project found” behavior under dotnet-tool installs.
tests/Aspire.Cli.EndToEnd.Tests/Helpers/CliInstallStrategyTests.cs Updates tests for inferred version and pointer-vs-RID nupkg behavior.
tests/Aspire.Cli.EndToEnd.Tests/DotnetToolSmokeTests.cs Adds smoke validation for aspire update --self showing dotnet tool update and simplifies local-source selection.
tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj Links new shared CliPackageDiscovery into CLI E2E tests.
src/Aspire.TypeSystem/HostingTypeHelpers.cs Adds trimming annotations to preserve interface metadata needed under NativeAOT.
src/Aspire.TypeSystem/AtsCapabilityInfo.cs Adds trimming annotations for CLR type references used by the type system.
src/Aspire.Cli/Utils/DotNetToolDetection.cs New implementation for detecting NativeAOT dotnet-tool installs via shim/store paths (testable via override).
src/Aspire.Cli/Utils/CliUpdateNotifier.cs Switches update command selection to DotNetToolDetection.
src/Aspire.Cli/Commands/UpdateCommand.cs Uses DotNetToolDetection; suppresses archive self-update prompting when running as dotnet tool; prints dotnet-tool update guidance for --self.
src/Aspire.Cli/Aspire.Cli.csproj Adjusts tool packing behavior to pack from prebuilt NativeAOT binaries and avoid publishing managed artifacts for tool packing.
eng/signing/signCliToolNupkg.proj New MicroBuild signing project for CLI tool nupkgs.
eng/Signing.props Adds signing inputs for NativeAOT CLI binaries prior to tool packing.
eng/scripts/verify-cli-tool-nupkg.ps1 New script validating tool nupkg layout, contents, archive binary equivalence, and optional nupkg signature presence.
eng/scripts/verify-cli-archive.sh Removes bash-based archive verification (replaced by pwsh-based script usage in pipelines).
eng/scripts/verify-cli-archive.ps1 Improves cross-platform behavior (home directory detection, PATH separator, chmod on non-Windows).
eng/pipelines/templates/prepare-log-artifact-directory.yml New helper to create a log artifact marker for non-MSBuild installer prep jobs.
eng/pipelines/templates/build_sign_native.yml Adds pack/sign/verify steps for CLI tool nupkgs and switches non-Windows archive verification to pwsh script.
eng/pipelines/azure-pipelines.yml Uses prepare-log-artifact template in installer preparation jobs.
eng/pipelines/azure-pipelines-unofficial.yml Uses prepare-log-artifact template in installer preparation jobs (unofficial pipeline).
eng/clipack/Common.projitems Updates native binary staging path assumptions and adds targets to extract signed archive payload and pack RID/pointer tool nupkgs.
eng/Build.props Removes Aspire.Cli.Tool.csproj from normal build graph; clarifies native-only selection conditions.
eng/AfterSigning.targets New target to pack CLI tool packages from native archive outputs after signing.
docs/ci/ci-pipeline-optimizations.md Documents archives as canonical payload and warns against consuming staging dirs for hashing/packing.
AGENTS.md Adds local build guidance (note: contains a problematic -tl:false recommendation).
.github/workflows/tests.yml Adds a Linux job to validate local native build produces correct CLI tool packages.
.github/workflows/build-cli-native-archives.yml Builds CLI packages with -pack, verifies tool nupkg contents, and uploads CLI tool nupkgs alongside other RID-specific nugets.

Comment thread AGENTS.md Resolved
Ankit Jain (radical) and others added 3 commits April 28, 2026 12:05
Ensure the package directory keeps a trailing slash before composing recursive package globs for MicroBuild signing.

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Keep native CLI tool package validation focused on the package layout and archive payload checks already covered by the AzDO native package jobs.

Co-authored-by: Copilot <[email protected]>
Comment thread .github/workflows/tests.yml Resolved
Comment thread eng/AfterSigning.targets
<_CliToolPackProperties Condition="'$(TreatWarningsAsErrors)' != ''" Include="TreatWarningsAsErrors=$(TreatWarningsAsErrors)" />
</ItemGroup>

<MSBuild Projects="@(_CliToolPackProject)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this route the best way to get the built output into 2 shipping vehicles?

From what I understand - we build the native archives, sign them, then go back and pack the dotnet CLI tool, but inject the archives bits into the project.

This seems complicated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We extract the binary from the archive as it would be signed at that point, and we can put that in the nupkg. And the nupkg itself would get signed on the main Windows job. We have explicit verification to ensure that the binaries are the same.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Which part specifically are you concerned about?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly the complexity. It feels like the build should happen at the same time.

  • Publish -> get a native AOT executable
  • That executable goes into 2 containers:
    • The .tar.gz / .zip
    • The .nupkg

No need for extra complexity. We produce both contianers at the same time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The constraint is that the native aspire binary has to be signed/notarized on the OS/arch-specific native jobs. That means on, say, the OSX native job, we can produce a signed/notarized aspire binary and archive, but we cannot produce a signed .nupkg. If we instead produce the .nupkg there and try to sign it later on the main Windows job, NuGet signing will fail because the aspire binary inside the package is not signed.

So this flow treats the signed native archive as the canonical payload: after signing, we extract the signed aspire binary from the archive and pack that into the RID-specific tool nupkg. With this, we get an unsigned nupkg that contains the signed aspire CLI, and the nupkg itself gets signed later on the main Windows job.

Another possible design would be to sign/notarize the raw binary by itself, then create both the archive and nupkg from AfterSigning.targets instead of using Arcade’s archive task as the container. That is probably doable, but it would be a larger rework and I am not convinced it is better than keeping the archive as the canonical signed artifact.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving modulo the comments below — none of these are blocking, but worth a look before merging. Also cc Chet Husk (@baronfel) since this overlaps a lot with dotnet-tool packaging territory and he might have opinions on the RID-specific tool layout / pointer package shape.

[GeneratedRegex(@"^[0-9A-Za-z.\-]+$")]
private static partial Regex VersionPattern();

[GeneratedRegex(@"^Aspire\.Cli\.(win|linux|linux-musl|osx)-(x64|arm64)\.", RegexOptions.IgnoreCase)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Heads up — we've now got the supported RID list duplicated in three places: this regex, s_toolPackageRuntimeIdentifiers in DotNetToolDetection.cs, and <RuntimeIdentifiers> in Aspire.Cli.csproj. Next time someone adds a RID and forgets one of these, the new RID-specific package will get misclassified as a pointer package (and tool detection breaks for that RID) without any obvious signal. Worth centralizing at some point — even a single shared constant + InternalsVisibleTo would help.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed — I added this as a follow-up task under #16543: #16543 (comment).

Comment thread eng/AfterSigning.targets Outdated
which depends on those projects being included in the build. -->
<Target Name="_PackCliDotnetToolAfterPack"
BeforeTargets="Pack"
Condition="'$(SkipNativeBuild)' != 'true' and '$(BuildBundleDepsOnly)' != 'true' and '$(SkipBundleDeps)' != 'true'">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small inconsistency with the comment above: this gates on SkipNativeBuild, BuildBundleDepsOnly, and SkipBundleDeps, but the matching ItemGroup in eng/Build.props only checks the first two. That means with SkipBundleDeps=true the native archive still ships but the dotnet-tool nupkg silently doesn't — would be good to either align them or document why they diverge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch. I’ll align the conditions so the archive and dotnet-tool package gates don’t diverge when SkipBundleDeps=true.


<!-- ArchiveFormat is derived from CliRuntime above: Windows RIDs are zip archives,
and all supported Linux/macOS RIDs are tar.gz archives. -->
<Exec Command="powershell -NoProfile -NonInteractive -Command &quot;Expand-Archive -LiteralPath '$(_CliArchivePath)' -DestinationPath '$(_NativeBinaryArchiveExtractionDir)' -Force&quot;"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Both this Expand-Archive command and the tar -xzf below interpolate $(_CliArchivePath) and $(_NativeBinaryArchiveExtractionDir) inside single quotes. If either ever resolves to a path with a ' in it, the command silently breaks. Probably fine in practice on our build agents, but worth a <Unzip> task for the zip path or at least escaping for tar.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, agreed. I opened #16543 to track hardening the archive extraction path separately. The current CI paths are controlled, but we should avoid composing Expand-Archive / tar commands with single-quoted MSBuild paths long-term.

Comment thread eng/Signing.props Outdated
<ItemsToSign Include="$(RepoRoot)eng\scripts\get-aspire-cli.ps1" Condition="$([System.OperatingSystem]::IsWindows())" />

<!-- Sign the NativeAOT CLI binary before _PackCliTool places it into the dotnet-tool nupkg. -->
<ItemsToSign Condition="$([System.OperatingSystem]::IsWindows())" Include="$(ArtifactsBinDir)Aspire.Cli.*\**\aspire.exe" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This glob (Aspire.Cli.*\**\aspire.exe) is broader than the aspire-managed patterns below — it'll also match intermediate AOT linker outputs under bin/Aspire.Cli.<rid>/Release/net10.0/<rid>/native/aspire(.exe), not just the final publish/aspire(.exe). Mostly wasted signing budget, but also a small risk of an unused signed binary leaking elsewhere. Might be worth scoping to **/publish/aspire(.exe) like the managed entries do.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Follow up #16542

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 3 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (1 test)
  • Aspire.Cli.EndToEnd.Tests.TypeScriptSqlServerNativeAssetsBundleTests.StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets — MCR registry rate limiting (HTTP 403)

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

Matched test failure patterns (26 tests)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.TracingEnablesTheRightActivitySource — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.TracingEnablesTheRightActivitySource_Keyed — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.OptionsTypeIsSealed — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.HealthChecksRegistersHealthCheckService(enabled: True) — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.HealthChecksRegistersHealthCheckService(enabled: False) — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.EachKeyedComponentRegistersItsOwnHealthCheck — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.TracingRegistersTraceProvider(enabled: True) — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.TracingRegistersTraceProvider(enabled: False) — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.MetricsRegistersMeterProvider(enabled: True) — MCR container pull denied (rate limiting)
  • Aspire.Microsoft.Data.SqlClient.Tests.ConformanceTests.MetricsRegistersMeterProvider(enabled: False) — MCR container pull denied (rate limiting)
  • ...and 16 more

Ankit Jain (radical) and others added 2 commits April 28, 2026 21:05
Handle Aspire CLI dotnet tool executions from custom tool paths by detecting sibling .store layouts.

Co-authored-by: Copilot <[email protected]>
@radical

Ankit Jain (radical) commented Apr 29, 2026 •

Copy link
Copy Markdown
Member Author

Use the detected dotnet tool install location when suggesting CLI update commands so custom --tool-path installs update the running CLI instead of the global tool.

Co-authored-by: Copilot <[email protected]>
@radical

Copy link
Copy Markdown
Member Author

The top commit changes the update command we show for .NET tool installs, and I want to sanity-check the split:

  • Global tool install: dotnet tool update -g Aspire.Cli
  • Tool-path install: dotnet tool update --tool-path "<toolPath>" Aspire.Cli

This now applies both to aspire update --self and to the update notification command.

cc Eric Erhardt (@eerhardt) Jose Perez Rodriguez (@joperezr) Maddy Montaquila (@maddymontaquila) Damian Edwards (@DamianEdwards) — does that look correct?

@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@radical
Ankit Jain (radical) merged commit 704e829 into microsoft:main Apr 29, 2026
562 of 567 checks passed
@github-actions github-actions Bot added this to the 13.3 milestone Apr 29, 2026
Ankit Jain (radical) added a commit to radical/aspire.dev that referenced this pull request May 5, 2026
Documents the new `dotnet tool install -g Aspire.Cli` install path
introduced in Aspire 13.3 (microsoft/aspire#16496, backported in
microsoft/aspire#16611).

- Adds a new "Install as a .NET tool" H2 to install-cli.mdx with the
  install command, the .NET SDK 10.0.100 prerequisite, and the matching
  `dotnet tool update -g Aspire.Cli` update command.
- Notes that `aspire update --self` is disabled for .NET tool installs
  (PR 16496 redirects users to `dotnet tool update` in that case).
- Updates the page description to drop "global" — the heading and body
  use ".NET tool" consistently.
- Adds the Upgrade Aspire page to See also.

Refs: microsoft#837 (item 1)

Co-authored-by: Copilot <[email protected]>
Ankit Jain (radical) added a commit to radical/aspire.dev that referenced this pull request May 5, 2026
Documents the new `dotnet tool install -g Aspire.Cli` install path
introduced in Aspire 13.3 (microsoft/aspire#16496, backported in
microsoft/aspire#16611).

- Adds a new "Install as a .NET tool" H2 to install-cli.mdx with the
  install command, the .NET SDK 10.0.100 prerequisite, and the matching
  `dotnet tool update -g Aspire.Cli` update command.
- Notes that `aspire update --self` is disabled for .NET tool installs
  (PR 16496 redirects users to `dotnet tool update` in that case).
- Updates the page description to drop "global" — the heading and body
  use ".NET tool" consistently.
- Adds the Upgrade Aspire page to See also.

Refs: microsoft#837 (item 1)

Co-authored-by: Copilot <[email protected]>
Ankit Jain (radical) added a commit to radical/aspire.dev that referenced this pull request May 5, 2026
Documents the new `dotnet tool install -g Aspire.Cli` install path
introduced in Aspire 13.3 (microsoft/aspire#16496, backported in
microsoft/aspire#16611).

- Adds a new "Install as a NativeAOT .NET tool" H2 to install-cli.mdx
  with the install command, the .NET SDK 10.0.100 prerequisite, and the
  matching `dotnet tool update -g Aspire.Cli` update command.
- Notes that `aspire update --self` is disabled for .NET tool installs
  (PR 16496 redirects users to `dotnet tool update` in that case).
- Updates the page description to drop "global" — the heading and body
  use "NativeAOT .NET tool" consistently.

Refs: microsoft#837 (item 1)

Co-authored-by: Copilot <[email protected]>
Copilot AI mentioned this pull request May 6, 2026
5 of 16 tasks
Nell Shamrell-Harrington (nellshamrell) pushed a commit to nellshamrell/aspire that referenced this pull request May 18, 2026
* feat(cli): detect NativeAOT dotnet tool installations

Add shared detection for Aspire CLI installations that run from dotnet tool shims, the tool store, or RID-specific NativeAOT tool packages.

Co-authored-by: Copilot <[email protected]>

* test(cli): add shared CLI package discovery helper

Introduce a shared helper for locating Aspire CLI pointer and RID-specific packages, and link it into deployment end-to-end tests for reuse.

Co-authored-by: Copilot <[email protected]>

* refactor(cli): prepare tool project for prebuilt native binaries

Update the CLI tool project so clipack can pack one RID-specific tool package at a time from a staged prebuilt NativeAOT binary instead of publishing the managed tool directly.

Co-authored-by: Copilot <[email protected]>

* fix(cli): use dotnet tool detection for update messaging

Route update notifications and self-update guidance through the shared dotnet tool detection helper so NativeAOT tool installations get the correct messaging.

Co-authored-by: Copilot <[email protected]>

* build(cli): pack dotnet tool from signed native archives

Wire clipack and after-signing targets so RID-specific and pointer dotnet tool packages are packed from the signed native CLI archives.

Co-authored-by: Copilot <[email protected]>

* fix(typesystem): annotate reflection used by NativeAOT CLI

Preserve interface metadata on CLR type references used by hosting type helpers so the NativeAOT CLI can safely perform resource type checks.

Co-authored-by: Copilot <[email protected]>

* ci(cli): verify CLI tool packages in pipelines

Add tool package verification scripts, wire native CLI package validation into CI and AzDO pipelines, and update E2E install strategy coverage for RID-specific packages.

Co-authored-by: Copilot <[email protected]>

* Sign CLI tool packages after native packing

Ensure CLI dotnet tool packages produced after native archive signing are NuGet-signed before publishing, and require signature verification in the native package validation step.

Co-authored-by: Copilot <[email protected]>

* Fix CLI tool package signing glob

Ensure the package directory keeps a trailing slash before composing recursive package globs for MicroBuild signing.

Co-authored-by: Copilot <[email protected]>

* Update AGENTS.md

Co-authored-by: Copilot <[email protected]>

* Remove extra CLI tool package signing step

Keep native CLI tool package validation focused on the package layout and archive payload checks already covered by the AzDO native package jobs.

Co-authored-by: Copilot <[email protected]>

* Add CLI dotnet tool bundle extraction coverage

Co-authored-by: Copilot <[email protected]>

* Address CLI tool PR feedback

Co-authored-by: Copilot <[email protected]>

* Document native CLI package signing flow

Co-authored-by: Copilot <[email protected]>

* Add IsAotCompatible to Aspire.TypeSystem.

* Remove CLI tool validation job

Co-authored-by: Copilot <[email protected]>

* Address CLI packaging review feedback

Co-authored-by: Copilot <[email protected]>

* Detect custom dotnet tool installs

Handle Aspire CLI dotnet tool executions from custom tool paths by detecting sibling .store layouts.

Co-authored-by: Copilot <[email protected]>

* Fix CLI tool-path update command

Use the detected dotnet tool install location when suggesting CLI update commands so custom --tool-path installs update the running CLI instead of the global tool.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants