Honor selected launch profile in bundled dotnet run - #19958
Open
Irakli Gabisonia (gabisonia) wants to merge 1 commit into
Open
Honor selected launch profile in bundled dotnet run#19958Irakli Gabisonia (gabisonia) wants to merge 1 commit into
Irakli Gabisonia (gabisonia) wants to merge 1 commit into
Conversation
Irakli Gabisonia (gabisonia)
requested review from
James Newton-King (JamesNK),
David Fowler (davidfowl) and
Mitch Denny (mitchdenny)
as code owners
September 4, 2026 20:51
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19958Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19958" |
Copilot started reviewing on behalf of
Irakli Gabisonia (gabisonia)
September 4, 2026 20:52
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The precedence behavior is correctly implemented with focused unit and end-to-end regression coverage.
Pull request overview
Honors the launch profile selected by the .NET SDK when bundled execution delegates to Aspire.
Changes:
- Uses
DOTNET_LAUNCH_PROFILEwhen no explicit Aspire option is provided. - Adds unit coverage for precedence, defaults, and missing profiles.
- Extends CLI end-to-end coverage to bundled
dotnet run.
File summaries
| File | Description |
|---|---|
src/Aspire.Cli/Projects/DotNetAppHostProject.cs |
Resolves the effective launch profile. |
tests/Aspire.Cli.Tests/Projects/DotNetAppHostProjectTests.cs |
Tests profile selection and fallback behavior. |
tests/Aspire.Cli.EndToEnd.Tests/LaunchProfileTests.cs |
Verifies explicit and bundled launch paths. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With CLI bundles enabled,
dotnet run --launch-profile httpdelegates toaspire run. The .NET SDK passes the selected profile throughDOTNET_LAUNCH_PROFILE, but the Aspire launcher ignored it and selected the first profile again.Use the effective
DOTNET_LAUNCH_PROFILEvalue when no explicit Aspire launch-profile option is provided. This preserves the selection for both direct AppHost launch and the fallback todotnet run; an explicit--launch-profilestill takes precedence.Fixes #19867
Validation
LaunchProfileTestsend-to-end cases passed in Linux ARM64 Docker containers using a locally built CLI bundle. They runaspire run --launch-profile E2Eanddotnet run --launch-profile E2E /p:AspireUseCliBundle=true, asserting the profile name, environment, application URL, and arguments observed by the running AppHost.Checklist