A staging-channel CLI (identity = staging) does not get the staging channel registered in PackagingService.GetChannelsAsync by default.
PackagingService only registers the staging channel when KnownFeatures.IsStagingChannelEnabled is true — i.e. when the stagingChannelEnabled feature flag is set, or configuration["channel"] == "staging". A user running a freshly downloaded staging CLI with no extra config hits neither condition.
The result: aspire new (and any other command that resolves channels) sees only { default, stable, daily } and falls back to Implicit (nuget.org). The CLI's own identity is silently ignored.
This is benign for aspire new after #17120 (it falls back to a stable nuget.org template, which restores fine), but it means staging users don't actually get the staging feed for templates or for aspire add. It should "just work" the same way daily does — the daily channel is registered unconditionally.
Suggestion
In PackagingService.GetChannelsAsync, treat CliExecutionContext.IdentityChannel == "staging" as another trigger for registering the staging channel, alongside the existing feature-flag / config triggers.
Repro
- Install a staging CLI:
./eng/scripts/get-aspire-cli.sh --quality staging --install-path /tmp/aspire-staging --skip-path
/tmp/aspire-staging/aspire new aspire-ts-starter --name X --output . --non-interactive — note that the generated aspire.config.json has no channel pin and the SDK version comes from nuget.org rather than the staging feed.
A staging-channel CLI (identity =
staging) does not get thestagingchannel registered inPackagingService.GetChannelsAsyncby default.PackagingServiceonly registers the staging channel whenKnownFeatures.IsStagingChannelEnabledis true — i.e. when thestagingChannelEnabledfeature flag is set, orconfiguration["channel"] == "staging". A user running a freshly downloaded staging CLI with no extra config hits neither condition.The result:
aspire new(and any other command that resolves channels) sees only{ default, stable, daily }and falls back to Implicit (nuget.org). The CLI's own identity is silently ignored.This is benign for
aspire newafter #17120 (it falls back to a stable nuget.org template, which restores fine), but it means staging users don't actually get the staging feed for templates or foraspire add. It should "just work" the same waydailydoes — the daily channel is registered unconditionally.Suggestion
In
PackagingService.GetChannelsAsync, treatCliExecutionContext.IdentityChannel == "staging"as another trigger for registering the staging channel, alongside the existing feature-flag / config triggers.Repro
./eng/scripts/get-aspire-cli.sh --quality staging --install-path /tmp/aspire-staging --skip-path/tmp/aspire-staging/aspire new aspire-ts-starter --name X --output . --non-interactive— note that the generatedaspire.config.jsonhas nochannelpin and the SDK version comes from nuget.org rather than the staging feed.