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
Target frameworks
MSBuild task packaging & selection
Build / CI matrix (drives test jobs and Docker images)
Source code
Acceptance criteria
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:
net8.0;net9.0;net10.0net10.0net10.0;net11.0i.e. the current LTS (.NET 10) plus the latest STS (.NET 11) — mirroring how the project currently pairs an LTS with the newest releases.
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 Drop .NET 8 and .NET 9 target frameworks (end of support 2026-11-10) #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
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.net11.0(once base images exist).