Repository navigation
Conversation
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.
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 2530Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 2530" |
Contributor
There was a problem hiding this comment.
🟢 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
TargetFrameworkssetting 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
4 of 10 tasks
10 tasks done
This branch has not been deployed
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.
Since #2527 made
global.jsonrequire the .NET 11 SDK, the two CI jobs that run a file-based app fromeng/fail on every PR:affected-testsin .NET CI, witheng/testing/select-affected-tests.cs(run)eng/scripts/generate-readme-integrations.cs(run)On runner images without the .NET 11 SDK,
dotnet runstops withA compatible .NET SDK was not found. With it,dotnet runstops withNETSDK1005: Assets file '…/obj/project.assets.json' doesn't have a target for 'net11.0'. The SDK builds the app fornet11.0, butDirectory.Build.propssetsTargetFrameworkstonet10.0, so restore runs only fornet10.0. #2437 kept the selector job on SDK 10 to avoid this (472d282), andglobal.jsonno longer allows that.This PR:
TargetFrameworksinDirectory.Build.propsonly whenFileBasedProgramisn'ttrue. Projects keep the same target frameworks.PR Checklist
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.mdandGITHUB_OUTPUT) are byte-identical to SDK 10 with theglobal.jsonfrom before #2527.The only red job,
Hosting.SqlDatabaseProjects.Tests, is fixed by #2529 in #2438.