Show AppHost SDK version in aspire ps#16517
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16517Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16517" |
There was a problem hiding this comment.
Pull request overview
Updates aspire ps to surface the running AppHost’s Aspire SDK version by querying the auxiliary backchannel v2 “AppHost info” endpoint, and displays it in both table and JSON output (sdkVersion, blank/null when unknown).
Changes:
- Extend the CLI backchannel abstraction with
GetAppHostInfoV2Asyncand use it inPsCommandto populatesdkVersion. - Add an
SDKcolumn to the table output and includesdkVersionin JSON output (null when unknown/“unknown”). - Add unit tests and localizable resources for the new column header.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/TestServices/TestAppHostAuxiliaryBackchannel.cs | Updates the test backchannel stub to support the new v2 AppHost info call. |
| tests/Aspire.Cli.Tests/Commands/PsCommandTests.cs | Adds tests validating sdkVersion in JSON/table output and introduces a JsonRpc-based test server helper. |
| src/Aspire.Cli/Commands/PsCommand.cs | Adds SdkVersion to the serialized model, queries v2 AppHost info, and displays an SDK table column. |
| src/Aspire.Cli/Backchannel/IAppHostAuxiliaryBackchannel.cs | Extends the interface with GetAppHostInfoV2Async. |
| src/Aspire.Cli/Resources/PsCommandStrings.resx | Adds HeaderSdk string resource. |
| src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs | Adds strongly-typed accessor for HeaderSdk. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.cs.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.de.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.es.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.fr.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.it.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ja.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ko.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.pl.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.pt-BR.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.ru.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.tr.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hans.xlf | Adds HeaderSdk translation entry. |
| src/Aspire.Cli/Resources/xlf/PsCommandStrings.zh-Hant.xlf | Adds HeaderSdk translation entry. |
Files not reviewed (1)
- src/Aspire.Cli/Resources/PsCommandStrings.Designer.cs: Language not supported
|
What does it look like? |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Use the assembly informational version, change the impl. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
What does it look like? |
|
Will it have values like |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the version-display feedback in adamint/aspire@0c5f64333. |
|
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.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/backport to release/13.3 |
|
Started backporting to |



Description
Fixes #16292
aspire psnow surfaces the AppHost SDK version from the v2 auxiliary backchannel in table output and JSON output assdkVersion, with unknown values rendered as blank/null.Validation:
dotnet test tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-restore --verbosity quiet -- --filter-class "*.PsCommandTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: