[release/13.5] Enable CLI bundle in C# AppHost templates - #19294
[release/13.5] Enable CLI bundle in C# AppHost templates#19294Jose Perez Rodriguez (joperezr) merged 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63b77c7f-f8cf-4923-8cd7-abaf1ff27a76
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63b77c7f-f8cf-4923-8cd7-abaf1ff27a76
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19294Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19294" |
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Updates Aspire templates and test infrastructure to opt AppHost projects into the Aspire CLI bundle by default, while ensuring template tests can still opt out via a global MSBuild property.
Changes:
- Add
AspireUseCliBundle=trueto AppHost project templates (csproj and single-fileapphost.cs). - Update test expectations and E2E assertions to align with CLI-bundle startup behavior.
- Adjust template-test harness command argument handling to avoid passing MSBuild build args to
dotnet new, and add a global property opt-out for builds/runs in tests.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/TemplatesTesting/DotNetNewCommand.cs | Avoids appending build/test/run MSBuild args to dotnet new invocations. |
| tests/Shared/TemplatesTesting/BuildEnvironment.cs | Sets a global MSBuild property to opt out of the CLI bundle in template tests. |
| tests/Shared/TemplatesTesting/AspireProject.cs | Passes template-test default MSBuild args into dotnet run. |
| tests/Aspire.Cli.Tests/Commands/InitCommandTests.cs | Updates assertions to require CLI-bundle opt-in in generated single-file AppHost. |
| tests/Aspire.Cli.EndToEnd.Tests/SingleFileAppHostInitDotnetRunTests.cs | Updates E2E expectations for CLI-bundle startup message and generated source. |
| tests/Aspire.Cli.EndToEnd.Tests/BundleSmokeTests.cs | Expects generated AppHost artifacts to already opt into the CLI bundle (no manual patching). |
| src/Aspire.ProjectTemplates/templates/aspire-ts-cs-starter/Aspire-StarterApplication.1.AppHost/Aspire-StarterApplication.1.AppHost.csproj | Adds <AspireUseCliBundle>true</AspireUseCliBundle> to template csproj. |
| src/Aspire.ProjectTemplates/templates/aspire-starter/Aspire-StarterApplication.1.AppHost/Aspire-StarterApplication.1.AppHost.csproj | Adds <AspireUseCliBundle>true</AspireUseCliBundle> to template csproj. |
| src/Aspire.ProjectTemplates/templates/aspire-empty/AspireApplication.1.AppHost/AspireApplication.1.AppHost.csproj | Adds <AspireUseCliBundle>true</AspireUseCliBundle> to template csproj. |
| src/Aspire.ProjectTemplates/templates/aspire-apphost/Aspire.AppHost1.csproj | Adds <AspireUseCliBundle>true</AspireUseCliBundle> to template csproj. |
| src/Aspire.ProjectTemplates/templates/aspire-apphost-singlefile/apphost.cs | Adds #:property AspireUseCliBundle=true directive to single-file template. |
| src/Aspire.Cli/Templating/Templates/empty-apphost/apphost.cs | Adds #:property AspireUseCliBundle=true directive to CLI-init template. |
| src/Aspire.Cli/Commands/InitCommand.cs | Ensures CLI-init single-file skeleton includes AspireUseCliBundle property directive. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 4 / 100 test projects · 5 jobs, from 13 changed files. Selected test projects (4 / 100)
Selected jobs (5)
How these were chosen — grouped by what changed🧪 📦 affected project 🔧 🔧 🔧 🔧 🔧 🧪 🧪 🧪 Job reasons
Selection computed for commit |
Jose Perez Rodriguez (joperezr)
left a comment
There was a problem hiding this comment.
Important fix to remove a warning from greenfield. Approved.
e9d8b87
into
release/13.5
|
✅ No documentation update needed. Step 5 branch taken: excluded → backport Exclusion reasons (from signals.json): This PR is a backport of #19076 to Triggered signals (informational only, not used since excluded=true): No docs PR was drafted. |
Backport of #19076 to release/13.5
/cc Damian Edwards (@DamianEdwards)
Customer Impact
Defaults all new C# AppHost projects created from templates to use the CLI bundle layout.
Testing
Verified using PR testing skill.
Risk
Low
Regression?
No