Skip to content

[release/13.1] Fix template version parsing for .NET 10.0 SDK separator change - #14698

Merged
Jose Perez Rodriguez (joperezr) merged 5 commits into
release/13.1from
jamesnk/template-parsing-fix-13.1
Feb 26, 2026
Merged

[release/13.1] Fix template version parsing for .NET 10.0 SDK separator change#14698
Jose Perez Rodriguez (joperezr) merged 5 commits into
release/13.1from
jamesnk/template-parsing-fix-13.1

Conversation

@JamesNK

@JamesNKJames Newton-King (JamesNK) commented Feb 25, 2026

Copy link
Copy Markdown
Member

Customer Impact

aspire init fails 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

  • Automated testing
  • Manual testing aspire init (TODO - waiting on CI to build PR CLI to test end-to-end)

Risk

Low

Regression?

Yes, aspire init use to always work. Now it will fail with new .NET SDK versions.

* 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>
CopilotAI review requested due to automatic review settings February 25, 2026 22:43
@github-actions

github-actionsBot commented Feb 25, 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14698

Or

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

@JamesNKJames Newton-King (JamesNK) changed the title Fix template version parsing for .NET 10.0 SDK separator change[release/13.1] Fix template version parsing for .NET 10.0 SDK separator changeFeb 25, 2026

CopilotAI 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 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 DotNetCliRunner parsing logic to accept @ separator (with :: fallback).
  • Expose the parsing helper as internal to 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.

FileDescription
src/Aspire.Cli/DotNet/DotNetCliRunner.csAccept @ as the primary template version separator, fallback to ::, and make parser callable from tests.
tests/Aspire.Cli.Tests/DotNet/DotNetCliRunnerTests.csAdd theory-based coverage for parsing both new and old SDK output formats.

Comment threadtests/Aspire.Cli.Tests/DotNet/DotNetCliRunnerTests.cs Outdated
Comment threadtests/Aspire.Cli.Tests/DotNet/DotNetCliRunnerTests.cs Outdated
@joperezrJose Perez Rodriguez (joperezr) added the Servicing-approved Approved for servicing release label Feb 25, 2026
@JamesNK

Copy link
Copy Markdown
MemberAuthor

Build failure:

Downloading 'https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh'
Attempting to install 'sdk v10.0.101' from public_location.
dotnet-install: Attempting to download using primary link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.101/dotnet-sdk-10.0.101-linux-x64.tar.gz
dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.101/dotnet-sdk-10.0.101-linux-x64.tar.gz size is 239025495 bytes.
dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.101/dotnet-sdk-10.0.101-linux-x64.tar.gz
dotnet-install: Downloaded file size is 239025495 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 10.0.101
dotnet-install: Adding to current process PATH: /home/runner/work/aspire/aspire/.dotnet. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
[0] ERROR: Exception in Command Processing for EventSource Dotnet-dev-certs: Event WslWindowsTrustSucceeded was assigned event ID 115 but 113 was passed to WriteEvent.
Trusting the HTTPS development certificate was requested. Trust is per-user and may require additional configuration. See https://aka.ms/dev-certs-trust for more information.
There was an error trusting the HTTPS developer certificate. It will be trusted by some clients but not by others.
Error: Process completed with exit code 4.

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>
Comment threadglobal.json Outdated
Comment threadglobal.json Outdated
* 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
@JamesNK

Copy link
Copy Markdown
MemberAuthor

PR also updates .NET SDK and has workaround for this issue: dotnet/aspnetcore#65391

This was referenced Mar 23, 2026
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Mar 28, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-cliServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@JamesNK@joperezr@danegsta