GitTools / GitTools/GitVersion
Add support for .NET 11
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 659
- Avg merge
- 13h 15m
- Merged PRs (30d)
- 51
Description
Summary
Add .NET 11 to GitVersion's supported target frameworks.
.NET 11 is the next Standard Term Support (STS) release, currently in preview, with GA expected November 2026. GitVersion should target it so the CLI/global tool, the MSBuild task, and the Docker images run natively on .NET 11.
Relationship to the framework cleanup
This is additive and complements #4997 (drop .NET 8 / .NET 9). Combined end state:
| Before | After #4997 | After #4997 + this |
|---|---|---|
net8.0;net9.0;net10.0 |
net10.0 |
net10.0;net11.0 |
i.e. the current LTS (.NET 10) plus the latest STS (.NET 11) — mirroring how the project currently pairs an LTS with the newest releases.
Timing: .NET 11 is preview until ~November 2026. Targeting can be staged behind preview SDKs, but the stable bump should land once .NET 11 GAs. Re-milestone if 7.x ships before then.
What needs to change
SDK
-
global.json— bumpsdk.versionfrom10.0.301to the .NET 11 SDK (11.0.1xx) once available (the SDK targets all earlier runtimes, so this is safe ahead of dropping anything).
Target frameworks
-
src/Directory.Build.props:3— addnet11.0to<TargetFrameworks>(e.g.net10.0;net11.0, accounting for #4997). -
src/Directory.Packages.props— add aMicrosoftBuildVersioncondition for'$(TargetFramework)' == 'net11.0'(the MSBuild/SDK version that ships with .NET 11), alongside the existing per-TFM entries.
MSBuild task packaging & selection
-
src/GitVersion.MsBuild/GitVersion.MsBuild.csproj— add atools/net11.0<None Include=.../>packaging entry mirroring the existingtools/net10.0one (:44). -
src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets— add anet11.0GitVersionTargetFrameworkselection branch consistent with the existing net9/net10 branches.
Build / CI matrix (drives test jobs and Docker images)
-
build/common/Utilities/Constants.cs:10— add"11.0"toDotnetVersions(e.g.[DotnetLtsLatest, "11.0"]). This single constant feeds the CI unit-test matrix (SetMatrix.cs→_prepare.yml→ci.yml/_unit_tests.yml) and the Docker image matrix (DockerBuildLifetime.cs). Confirm Docker base images fornet11.0are available before enabling the Docker leg.
Source code
- No changes expected. The only TFM-conditional code,
src/GitVersion.Core/Core/RegexPatterns.cs, gates on#if NET9_0_OR_GREATER, which already includesnet11.0— the partial-property[GeneratedRegex]path applies automatically. (Verify nothing new is needed if .NET 11 deprecates/changes any used API.)
Acceptance criteria
-
dotnet build/dotnet test ./src/GitVersion.slnxpass withnet11.0in the matrix. -
dotnet format --verify-no-changes ./src/GitVersion.slnxpasses. -
GitVersion.MsBuildsmoke-tested against anet11.0consumer project. - Docker images produced for
net11.0(once base images exist). - No analyzer/obsolete warnings introduced by the .NET 11 SDK/runtime.
- Docs / release notes mention .NET 11 support.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with global.json, src/Directory.Build.props, src/Directory.Packages.props, GitVersion.MsBuild.csproj, its targets file, and build/common/Utilities/Constants.cs. Run the solution build and tests, then verify formatting and the MSBuild smoke test. Done means the net11.0 matrix, packaging, CI, Docker images, and documentation meet the listed acceptance criteria without new warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker
- Domain
- build-system, ci-cd, devops, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100