Skip to content

Update to .NET 11 SDK#2931

Draft
martincostello wants to merge 25 commits into
mainfrom
dotnet-vnext
Draft

Update to .NET 11 SDK#2931
martincostello wants to merge 25 commits into
mainfrom
dotnet-vnext

Conversation

@martincostello

Copy link
Copy Markdown
Member

Update to build and test with .NET 11. net11.0 is explicitly not being added as a new TFM for the packages we ship to NuGet.org.

Changes include:

  • Build with the .NET 11 SDK.
  • Add net11.0 to the test projects.
  • Drop net8.0 and net9.0 from the test projects.
  • Use C# 15 features where relevant.

@martincostello martincostello added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code keep-open Prevents an issue or pull request from being marked as stale labels Feb 13, 2026
@codecov

codecov Bot commented Feb 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.38710% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.16%. Comparing base (741a38e) to head (1f04428).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Polly/AsyncPolicy.ExecuteOverloads.cs 41.66% 7 Missing ⚠️
src/Polly/Policy.ExecuteOverloads.cs 50.00% 4 Missing ⚠️
src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs 50.00% 3 Missing ⚠️
src/Polly/Policy.TResult.ExecuteOverloads.cs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2931   +/-   ##
=======================================
  Coverage   96.16%   96.16%           
=======================================
  Files         311      311           
  Lines        7139     7139           
  Branches     1006     1006           
=======================================
  Hits         6865     6865           
  Misses        221      221           
  Partials       53       53           
Flag Coverage Δ
linux 96.16% <48.38%> (ø)
macos 96.16% <48.38%> (ø)
windows 96.15% <48.38%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

- Build with the .NET 11 preview 1 SDK.
- Test with `net11.0`.
- Drop testing with `net8.0` and `net9.0`.
- Fix new code analysis warnings.
Update .NET SDK to version 11.0.100-preview.2.26159.112.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-version: 11.0.100-preview.2.26159.112
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
Co-authored-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
Comment thread bench/Polly.Benchmarks/Polly.Benchmarks.csproj Outdated
Comment thread Directory.Packages.props Outdated
Comment thread Directory.Packages.props Outdated
Comment thread Directory.Packages.props Outdated
Comment thread eng/stryker-config.json

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.

Update target-framework to net11.0 when Stryker supports it.

Comment thread eng/stryker-config.json Outdated
Stryker errors for any unknown properties.
@martincostello

Copy link
Copy Markdown
Member Author

Failure on Linux is dotnet/runtime#125435.

Work around issue with newer versions of Clang.
Comment thread test/Polly.AotTest/Polly.AotTest.csproj Outdated
martincostello and others added 7 commits March 12, 2026 14:53
Only apply native AoT workaround on Linux.
Update .NET SDK to version 11.0.100-preview.3.26207.106.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  dependency-version: 11.0.100-preview.3.26207.106
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
Co-authored-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
- Update NuGet packages for preview 3.
- Fix CS8629 warnings from `Nullable<T>.Value` usage.
Comment thread test/Polly.AotTest/Polly.AotTest.csproj Outdated
Remove workaround for Linux issue that should be fixed in .NET 11 preview 3.
martincostello added a commit that referenced this pull request Apr 14, 2026
Cherry-pick fix from #2931 for new compiler warning when accessing `Nullable<T>.Value`.
martincostello added a commit that referenced this pull request Apr 14, 2026
Cherry-pick fix from #2931 for new compiler warning when accessing `Nullable<T>.Value`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file keep-open Prevents an issue or pull request from being marked as stale .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant