[release/13.1] Fix template version parsing for .NET 10.0 SDK separator change#14698
[release/13.1] Fix template version parsing for .NET 10.0 SDK separator change#14698joperezr merged 5 commits intorelease/13.1from
Conversation
* Initial plan * Fix template version parsing to support @ separator for .NET 10.0 SDK Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> * Refactor into parameterized test using Theory and InlineData Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14698Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14698" |
There was a problem hiding this comment.
Pull request overview
This PR updates Aspire CLI’s template-install stdout parsing to handle the .NET 10 SDK change from :: to @ as the package/version separator, preventing aspire init failures on newer SDKs.
Changes:
- Update
DotNetCliRunnerparsing logic to accept@separator (with::fallback). - Expose the parsing helper as
internalto enable direct unit testing. - Add new unit tests covering both separators and invalid/missing formats.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Aspire.Cli/DotNet/DotNetCliRunner.cs | Accept @ as the primary template version separator, fallback to ::, and make parser callable from tests. |
| tests/Aspire.Cli.Tests/DotNet/DotNetCliRunnerTests.cs | Add theory-based coverage for parsing both new and old SDK output formats. |
|
Build failure:
I think this is a bug in the .NET SDK. Does it need to be updated in 13.1 branch? |
* Initial plan * Update SDK version from 10.0.101 to 10.0.102 Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>
* Try making dotnet not identify github as WSL2, ignore trust error * Skip on error * Remove continue-on-error since workaround was successful * Allow exit code 4 * Add comment explaining workaround
|
PR also updates .NET SDK and has workaround for this issue: dotnet/aspnetcore#65391 |
Customer Impact
aspire initfails with .NET 10.0.200 (currently preview, releasing in early March) because the SDK changed the output text, and Aspire fails to parse the new output text.Fix is to support both formats.
Testing
aspire init(TODO - waiting on CI to build PR CLI to test end-to-end)Risk
Low
Regression?
Yes,
aspire inituse to always work. Now it will fail with new .NET SDK versions.