Skip to content

Additive .NET 11 support and updated Docker matrix - #5207

Merged
arturcic merged 13 commits into
GitTools:mainfrom
arturcic:codex/dotnet-11-support
Oct 19, 2026
Merged

arturcic merged 13 commits into
GitTools:mainfrom
arturcic:codex/dotnet-11-support

Conversation

@arturcic

@arturcic arturcic commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

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

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Summary by CodeRabbit

  • New Features

    • GitVersion v7 targets .NET 10 and .NET 11, with MSBuild selecting compatible tooling for projects. .NET 11 support remains under validation until general availability.
    • Docker images default to Ubuntu 26.04 and are built for .NET 10 and .NET 11 on newer Linux distributions, including CentOS Stream 10, Debian 13, and Fedora 44. Ubuntu 24.04 and Alpine 3.23 remain available; retired-distribution images receive no new builds.
  • Documentation

    • Updated installation, migration, and MSBuild guidance to describe runtime requirements, framework selection, and Docker distribution changes.

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.

@arturcic arturcic left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take in consideration the PR will no be merged but carried on until the GA version is available, then we do the proper adjustments

Comment thread build/docker/Dockerfile Outdated
Comment thread .github/actions/cache-restore/action.yml
Comment thread .devcontainer/Dockerfile Outdated
Comment thread .github/actions/docker-test/action.yml Outdated
Comment thread src/GitVersion.MsBuild.Tests/GitVersion.MsBuild.Tests.csproj
Comment thread build/build/Tasks/Test/UnitTest.cs Outdated
Comment thread build/build/Tasks/Package/PackageNuget.cs
Comment thread docs/input/docs/design/dotnet-11-support.md Outdated
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 4 times, most recently from e8d882f to 0f08737 Compare September 15, 2026 11:01
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 3 times, most recently from 0d004ef to da996f0 Compare September 17, 2026 20:29
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 694a6477-2dab-4af7-93ac-ea2a1b352c14
📥 Commits

Reviewing files that changed from the base of the PR and between ae20e7e and b5d6acf.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51c70e1c-0f41-4dc6-b256-04ef68a8e2bd
📥 Commits

Reviewing files that changed from the base of the PR and between bd915bf and b715113.

📒 Files selected for processing: 10
  • .devcontainer/Dockerfile
  • BREAKING_CHANGES.md
  • CLAUDE.md
  • build/common/Utilities/Constants.cs
  • build/docs/Utilities/Mermaid.cs
  • docs/input/docs/migration/v6-to-v7.md
  • docs/input/docs/usage/cli/installation.md
  • global.json
  • new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs
  • src/Directory.Packages.props

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The change adds .NET 11 targeting and packaging alongside .NET 10, updates MSBuild framework selection, and changes Docker distribution defaults. It also adds validation for the documentation parser’s C# Preview support and updates CI workflows and user guidance.

Changes: .NET 11 support

Layer / File(s) Summary
SDK and build matrix
global.json, src/Directory.Build.props, build/common/Utilities/Constants.cs, build/build/Tasks/Package/PackageNuget.cs, .github/actions/*, .github/workflows/*, build/build/Tasks/Test/*, src/GitVersion.App.Tests/ExecCmdLineArgumentTest.cs, new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs, docs/input/docs/usage/cli/installation.md, docs/input/docs/migration/v6-to-v7.md, BREAKING_CHANGES.md
The configuration targets .NET 10 and .NET 11. CLI packaging publishes for both versions. CI requests the .NET 10 SDK alongside global.json; tests collect coverage only for the LTS target. The CLI installation and migration guidance describes the .NET versions and runtime requirements.
MSBuild tool packaging and selection
src/GitVersion.MsBuild/*, src/GitVersion.MsBuild.Tests/*, docs/input/docs/usage/msbuild.md, docs/input/docs/migration/v6-to-v7.md
The package includes tools for net11.0. MSBuild selects net11.0 tools for compatible consumers and otherwise retains the net10.0 selection and fallback. Tests cover framework selection and explicit overrides.
Preview-language docs parser validation
build/docs/*, .github/workflows/docs.yml, CONTRIBUTING.md
The docs parser uses C# Preview parsing and reports parse errors. A new validation task checks C# 15 fixture compilation, generated documentation, C# 14 parse errors, and malformed input.
Docker distribution defaults
.devcontainer/*, .github/actions/docker-test/action.yml, build/common/Utilities/Constants.cs, build/docker/Dockerfile, build/common/Lifetime/DockerBuildLifetime.cs, docs/input/docs/migration/v6-to-v7.md, docs/input/docs/usage/cli/installation.md
Docker defaults change to Ubuntu 26.04. The latest CentOS, Debian, Fedora, and Ubuntu distribution constants change, and the dev container, test action, and documentation reflect the new defaults and distribution guidance.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~30 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ConsumerProject
  participant GitVersionMsBuildTargets
  participant GitVersionMsBuildTaskAssembly
  participant GitVersionCLI
  ConsumerProject->>GitVersionMsBuildTargets: evaluate consumer target framework
  GitVersionMsBuildTargets->>GitVersionMsBuildTaskAssembly: select compatible tools framework
  GitVersionMsBuildTaskAssembly->>GitVersionCLI: launch dotnet exec with major-version roll-forward
Loading
Merge Risk: ⚪ Minimal · up to b7151

The SDK and container versions are aligned, with no established merge-blocking issue remaining.

Pre-merge checks: Passed 3 · Failed 1 · Inconclusive 1

Failed Failed checks: 1 warning · 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 10 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check Inconclusive The implementation addresses the coding requirements in [#4998]. The solution targets net10.0 and net11.0. MicrosoftBuildVersion has a net11.0 condition. MSBuild packaging and framework select… Provide current-head results for the issue acceptance checks that are not established: format verification, complete build and test validation, warning checks, and the .NET 11 MSBuild consumer and Docker matrix checks.
Passed Passed checks: 3 passed
Check name Status Explanation
Out of Scope Changes check Passed The changes remain within [#4998]. The SDK and target framework updates, MSBuild selection and packaging, CI and Docker matrix changes, compatibility tests, parser validation, coverage handling, and d…
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely summarizes the main changes: additive .NET 11 support and the updated Docker matrix.
Full details: Out of Scope Changes check

Explanation

The changes remain within [#4998]. The SDK and target framework updates, MSBuild selection and packaging, CI and Docker matrix changes, compatibility tests, parser validation, coverage handling, and documentation all support additive .NET 11 support while retaining .NET 10. No unrelated change is demonstrated.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 10 files. (7 skipped: 7 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Linked Issues check

Explanation

The implementation addresses the coding requirements in [#4998]. The solution targets net10.0 and net11.0. MicrosoftBuildVersion has a net11.0 condition. MSBuild packaging and framework selection include net11.0. The CI and Docker matrices include .NET 11. Documentation and compatibility tests are present. The current evidence does not establish dotnet format --verify-no-changes, complete current-head build and test validation, absence of analyzer or obsolete warnings, or successful production of the full Docker matrix.

Resolution

Provide current-head results for the issue acceptance checks that are not established: format verification, complete build and test validation, warning checks, and the .NET 11 MSBuild consumer and Docker matrix checks.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arturcic arturcic mentioned this pull request Sep 21, 2026
59 of 76 tasks
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 2 times, most recently from 094b37d to b47b59e Compare September 21, 2026 11:04
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 5 times, most recently from dc72cfd to 4fe0f18 Compare October 2, 2026 12:50
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch from 4fe0f18 to 12c268f Compare October 6, 2026 05:10
@arturcic
arturcic marked this pull request as ready for review October 6, 2026 07:30
Copilot AI balanced review requested due to automatic review settings October 6, 2026 07:30

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.

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 Low severity

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.

Comment thread src/Directory.Build.props
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 5 times, most recently from cdb4c8b to b4dd77b Compare October 12, 2026 11:05
@arturcic

Copy link
Copy Markdown
Member Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
✅ Action performed

Reviews resumed and review finished.

@arturcic
arturcic force-pushed the codex/dotnet-11-support branch 2 times, most recently from 97d8cd0 to ae20e7e Compare October 17, 2026 19:43
@arturcic arturcic changed the title Draft additive .NET 11 support and updated Docker matrix Additive .NET 11 support and updated Docker matrix Oct 19, 2026
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch from ae20e7e to b5d6acf Compare October 19, 2026 18:12
@sonarqubecloud

Copy link
Copy Markdown

@arturcic

Copy link
Copy Markdown
Member Author

@Mergifyio queue

@arturcic
arturcic merged commit a8ce42f into GitTools:main Oct 19, 2026
52 checks passed
@arturcic
arturcic deleted the codex/dotnet-11-support branch October 19, 2026 18:41
@mergify

mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
  • -closed [📌 queue requirement]
  • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
All conditions
  • -closed [📌 queue requirement]
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule default]:
      • github-review-approved [🛡 GitHub repository ruleset rule main branch rule]
      • check-success=Build & Test (new-cli)
      • check-success=DotNet Format
      • check-success=Release
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/DotNet Format
        • check-neutral = @github-actions/DotNet Format
        • check-skipped = @github-actions/DotNet Format
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Release
        • check-neutral = @github-actions/Release
        • check-skipped = @github-actions/Release
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Test (new-cli)
        • check-neutral = @github-actions/Build & Test (new-cli)
        • check-skipped = @github-actions/Build & Test (new-cli)
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / macos-26
        • check-neutral = @github-actions/Build & Package / macos-26
        • check-skipped = @github-actions/Build & Package / macos-26
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / ubuntu-24.04
        • check-neutral = @github-actions/Build & Package / ubuntu-24.04
        • check-skipped = @github-actions/Build & Package / ubuntu-24.04
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Build & Package / windows-2025-vs2026
        • check-neutral = @github-actions/Build & Package / windows-2025-vs2026
        • check-skipped = @github-actions/Build & Package / windows-2025-vs2026
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-neutral = Mergify Merge Protections
        • check-skipped = Mergify Merge Protections
        • check-success = Mergify Merge Protections
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @sonarqubecloud/SonarCloud Code Analysis
        • check-neutral = @sonarqubecloud/SonarCloud Code Analysis
        • check-skipped = @sonarqubecloud/SonarCloud Code Analysis
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / macos-26 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / macos-26 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / macos-26 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / macos-26 - net10.0 - managed
        • check-neutral = @github-actions/Test / macos-26 - net10.0 - managed
        • check-skipped = @github-actions/Test / macos-26 - net10.0 - managed
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
        • check-neutral = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
        • check-skipped = @github-actions/Test / ubuntu-24.04 - net10.0 - managed
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
        • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
        • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - libgit2
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
        • check-neutral = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
        • check-skipped = @github-actions/Test / windows-2025-vs2026 - net10.0 - managed
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @github-actions/Linear PR History
        • check-neutral = @github-actions/Linear PR History
        • check-skipped = @github-actions/Linear PR History
      • any of [🛡 GitHub repository ruleset rule main branch rule]:
        • check-success = @coderabbitai/CodeRabbit
        • check-neutral = @coderabbitai/CodeRabbit
        • check-skipped = @coderabbitai/CodeRabbit
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = @mergify/Configuration changed
    • check-success = @mergify/Configuration has been deleted
  • any of [📌 queue requirement]:
    • check-neutral = @mergify/Mergify Merge Protections
    • check-skipped = @mergify/Mergify Merge Protections
    • check-success = @mergify/Mergify Merge Protections

@mergify

mergify Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Thank you @arturcic for your contribution!

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.

Add support for .NET 11

2 participants