Skip to content

Conversation

@eerhardt
Copy link
Member

Description

The Aspire CLI "global .net tool" now targets net10 with #10167. This means anyone using the dotnet tool install version will need the .NET 10 SDK to use it.

Revert back to targeting net8.0 for the global tool.

@DamianEdwards @davidfowl @maddymontaquila - I assume we don't want to require users to have the .NET 10 SDK to use Aspire. Is that a correct assumption?

@github-actions
Copy link
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 -- 12454

Or

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

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 reverts the Aspire CLI global tool to target .NET 8.0 instead of .NET 10.0, ensuring users don't need the .NET 10 SDK to install and use the tool via dotnet tool install. The change adds conditional compilation to handle API differences between .NET versions.

Key Changes

  • Reverted the global tool target framework from net10.0 to net8.0 (DefaultTargetFramework)
  • Added conditional compilation for X509Certificate loading to support both .NET 8.0 and .NET 9.0+

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Cli/Aspire.Cli.csproj Explicitly sets TargetFramework to DefaultTargetFramework for the global tool build configuration
src/Aspire.Cli/Backchannel/ExtensionBackchannel.cs Adds conditional compilation to use appropriate X509Certificate loading API based on target framework

@DamianEdwards
Copy link
Member

@baronfel where did we land on being able to package a native AoT version of a tool alongside a regular FDD version in the same package?

@baronfel
Copy link
Member

nothing productized for .NET 10, but you could take + test this commit to get something working for Aspire specifically.

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Assuming we don't need to condition the targetframework above and this works as expected

@eerhardt eerhardt merged commit 40fb153 into dotnet:main Oct 28, 2025
297 checks passed
@eerhardt eerhardt deleted the CliToolNet8 branch October 28, 2025 19:14
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 28, 2025
radical pushed a commit that referenced this pull request Oct 29, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants