Skip to content

Run the file-based CI scripts on the .NET 11 SDK - #2530

Open
Laurianti wants to merge 1 commit into
CommunityToolkit:mainfrom
Laurianti:ci-file-based-apps-net11
Open

Laurianti wants to merge 1 commit into
CommunityToolkit:mainfrom
Laurianti:ci-file-based-apps-net11

Conversation

@Laurianti

@Laurianti Laurianti commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Since #2527 made global.json require the .NET 11 SDK, the two CI jobs that run a file-based app from eng/ fail on every PR:

  • affected-tests in .NET CI, with eng/testing/select-affected-tests.cs (run)
  • README Integrations Check, with eng/scripts/generate-readme-integrations.cs (run)

On runner images without the .NET 11 SDK, dotnet run stops with A compatible .NET SDK was not found. With it, dotnet run stops with NETSDK1005: Assets file '…/obj/project.assets.json' doesn't have a target for 'net11.0'. The SDK builds the app for net11.0, but Directory.Build.props sets TargetFrameworks to net10.0, so restore runs only for net10.0. #2437 kept the selector job on SDK 10 to avoid this (472d282), and global.json no longer allows that.

This PR:

  • sets TargetFrameworks in Directory.Build.props only when FileBasedProgram isn't true. Projects keep the same target frameworks.
  • installs the .NET 11 SDK in both jobs.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Contains NO breaking changes

Other information

I ran both scripts in Docker with SDK 10.0.404 and 11.0.100, on the heads of #2438 and #2425. With this change, the README check passes and the selector's outputs (selection.json, changed-files.txt, selection-summary.md and GITHUB_OUTPUT) are byte-identical to SDK 10 with the global.json from before #2527.

The only red job, Hosting.SqlDatabaseProjects.Tests, is fixed by #2529 in #2438.

global.json requires the .NET 11 SDK since CommunityToolkit#2527. The affected-tests and
README integrations jobs now install it. Directory.Build.props no longer
sets TargetFrameworks for file-based apps, which the .NET 11 SDK builds
for net11.0.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 20:50
@github-actions

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/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2530

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2530"

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the .NET 11 CI and file-based target-framework changes.

No open issues 🎉

What changed in this PR

Updates the two file-based CI script jobs to use the .NET 11 SDK required by global.json, while preventing shared build settings from overriding their target framework.

Changes:

  • Applies the shared TargetFrameworks setting only to non-file-based projects, preserving existing project targets.
  • Installs .NET 11 for the affected-test selector and README integrations check.
File Description
Directory.Build.props Lets file-based apps retain the SDK-selected target framework.
.github/​workflows/​readme-integrations-check.yml Installs .NET 11 before running the README check.
.github/​workflows/​dotnet-ci.yml Switches the affected-test selector job to .NET 11.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants