Skip to content

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

Merged
joperezr merged 5 commits intorelease/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
joperezr merged 5 commits intorelease/13.1from
jamesnk/template-parsing-fix-13.1

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Feb 25, 2026

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>
Copilot AI review requested due to automatic review settings February 25, 2026 22:43
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

🚀 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"

@JamesNK 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 change Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

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.

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.

@joperezr joperezr added the Servicing-approved Approved for servicing release label Feb 25, 2026
@JamesNK
Copy link
Member Author

JamesNK commented Feb 25, 2026

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>
joperezr and others added 2 commits February 25, 2026 15:45
* 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
Member Author

JamesNK commented Feb 25, 2026

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

This was referenced Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-cli Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants