Repository navigation
Additive .NET 11 support and updated Docker matrix - #5207
Conversation
arturcic
left a comment
There was a problem hiding this comment.
Take in consideration the PR will no be merged but carried on until the GA version is available, then we do the proper adjustments
e8d882f to
0f08737
Compare
0d004ef to
da996f0
Compare
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
094b37d to
b47b59e
Compare
dc72cfd to
4fe0f18
Compare
4fe0f18 to
12c268f
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Multi-targeting breaks the repository’s documented local CLI command unless an explicit framework is added.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds dual .NET 10/.NET 11 support across the stable CLI, MSBuild package, tests, CI, Docker images, and documentation.
Changes:
- Multi-targets stable projects and packages MSBuild tools for both frameworks.
- Expands CI, Docker, language-compatibility, and framework-selection validation.
- Updates runtime, migration, contributor, and container documentation.
| File | Description |
|---|---|
src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets |
Selects compatible tool framework. |
src/GitVersion.MsBuild/GitVersion.MsBuild.csproj |
Packages net11 tools. |
src/GitVersion.MsBuild.Tests/TargetFrameworkSelectionTests.cs |
Tests framework selection. |
src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj |
Stages targets for tests. |
src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs |
Isolates temporary test directory. |
src/Directory.Build.props |
Enables dual targeting. |
new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs |
Verifies C# 14/net10 generation. |
global.json |
Pins .NET 11 RC1 SDK. |
docs/input/docs/usage/msbuild.md |
Documents MSBuild runtime selection. |
docs/input/docs/usage/cli/installation.md |
Updates installation and Docker guidance. |
docs/input/docs/migration/v6-to-v7.md |
Documents framework and distro migration. |
CONTRIBUTING.md |
Adds language compatibility policy. |
build/docs/Utilities/Mermaid.cs |
Runs diagram generation once on net10. |
build/docs/Utilities/DocsApi.cs |
Enables preview parsing and validation. |
build/docs/Tasks/ValidateDocsParser.cs |
Adds parser compatibility checks. |
build/docker/Dockerfile |
Changes default Docker distribution. |
build/common/Utilities/Constants.cs |
Expands framework and distro matrices. |
build/common/Lifetime/DockerBuildLifetime.cs |
Removes trailing whitespace. |
build/build/Tasks/Test/UnitTest.cs |
Limits coverage collection to net10. |
build/build/Tasks/Test/TestReporting.cs |
Makes coverage arguments optional. |
build/build/Tasks/Package/PackageNuget.cs |
Publishes both CLI frameworks. |
BREAKING_CHANGES.md |
Documents runtime and Docker changes. |
.github/workflows/new-cli.yml |
Installs net10 and validates language versions. |
.github/workflows/mkdocs.yml |
Installs retained net10 SDK. |
.github/workflows/format.yml |
Installs retained net10 SDK. |
.github/workflows/docs.yml |
Adds docs-parser validation. |
.github/workflows/codeql-analysis.yml |
Installs retained net10 SDK. |
.github/workflows/_prepare.yml |
Installs retained net10 SDK. |
.github/actions/docker-test/action.yml |
Updates default test distribution. |
.github/actions/cache-restore/action.yml |
Installs retained net10 SDK. |
.devcontainer/Dockerfile |
Uses the .NET 11 RC1 SDK image. |
.devcontainer/devcontainer.json |
Simplifies Docker build configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cdb4c8b to
b4dd77b
Compare
09fd1a7 to
450b175
Compare
|
@coderabbitai resume |
✅ Action performedReviews resumed and review finished. |
97d8cd0 to
ae20e7e
Compare
ae20e7e to
b5d6acf
Compare
|
|
@Mergifyio queue |
Merge Queue Status
Waiting for
All conditions
|
|
Thank you @arturcic for your contribution! |




Description
Add .NET 11 RC1 support while retaining .NET 10 for the stable CLI, core libraries, MSBuild package and tests. The MSBuild package includes both tool targets and selects net11 for compatible consumers, with regression coverage for older targets and explicit overrides.
The repository SDK is pinned to .NET 11 RC1; CI also installs .NET 10 for retained tests and build tooling. The development container uses Microsoft's .NET 11 RC1 SDK base image directly without installing additional .NET versions. Build tooling and the experimental CLI keep their existing targets. Standalone archives remain on .NET 10.
All three build trees use LangVersion=latest while retaining .NET 10. CI verifies this policy, the generator test explicitly compiles generated code for a C# 14/net10 consumer, and a docs-parser validation task checks C# 14 and C# 15 syntax, API inventory and XML comments using the docs Roslyn dependency. The C# 15 collection-arguments fixture must compile with the configured parser and fail with C# 14; its type and property documentation must survive extraction. Roslyn 5.9 still gates that syntax behind LanguageVersion.Preview, so the docs parser enables preview independently of the SDK compiler. Revisit this temporary setting with the GA Roslyn package. The generator retains netstandard2.0 and PolySharp. At .NET 11 GA, upgrade build tooling and include the deferred DocsInputs collection-arguments cleanup; no broad C# 15 syntax sweep is included.
Docker jobs cover both frameworks using the base images published after GitTools/build-images#104: Alpine 3.23, CentOS Stream 10, Debian 13, Fedora 44, and Ubuntu 26.04/24.04. Ubuntu 26.04 is the default. Breaking-change and migration documentation describes the runtime requirements and retired distribution builds.
Related Issue
Closes #4998.
Motivation and Context
Prepare additive .NET 11 support without removing .NET 10. The required GitTools SDK/runtime base images are now published, allowing the Docker matrix to validate both frameworks.
How Has This Been Tested?
Rebased onto main at
2a1ed7578, including the merged Modernize selected code with C# 12–14 and nullable contracts #5209 modernization. Range-diff confirms the existing five PR commits are unchanged apart from rebase; language compatibility is a separate commit.Actionlint and whitespace checks pass for the new compatibility changes. Their build, generator and docs-parser checks are pending CI; no additional local builds or tests were run.
Local dual-target solution build, build tooling and experimental CLI builds passed. The new CLI generator test passed.
Managed-backend tests passed 37,577 cases per framework, excluding live GitHub clone tests, performance thresholds and one host-sensitive HTTP error-message test. These exclusions are not claimed as passes.
Focused LibGit2Sharp main scenarios passed 22 cases per framework.
macOS ARM64 tool installation and MSBuild package consumer checks passed for SDK 10/net10 and SDK 11/net11.
Workflow syntax and whitespace checks passed after the Docker follow-up. Full current-head validation is delegated to this PR's CI.
This PR will remain a draft and will not be merged before .NET 11 GA. At GA, update the SDK/runtime pins and revalidate the final packages and Docker images before merging. Complete OS/RID and runtime-only validation and Windows task-host checks remain open. The earlier all-RID local pack was interrupted by NuGet download failures; no complete cross-platform packaging result is claimed.
Checklist
Summary by CodeRabbit
New Features
Documentation
Base and scope
Rebased onto main at
49b3f30cb, which includes the non-root Docker fixes from #5315. The seven duplicate non-root commits have been removed from this PR; the 12 retained .NET 11 commits are patch-equivalent according to range-diff. Ancestry and whitespace checks passed. CI must validate the rebased head; earlier green runs are not validation of this revision.