Skip to content

Draft additive .NET 11 support and updated Docker matrix - #5207

Draft
arturcic wants to merge 7 commits into
GitTools:mainfrom
arturcic:codex/dotnet-11-support
Draft

arturcic wants to merge 7 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.

@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
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 2 times, most recently from 40aeb2b to 454342c Compare September 15, 2026 12:01
@arturcic
arturcic force-pushed the codex/dotnet-11-support branch from 0d004ef to da996f0 Compare September 17, 2026 20:29
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@sonarqubecloud

Copy link
Copy Markdown

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

1 participant