Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET 9 SDK #2003

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Update to .NET 9 SDK #2003

wants to merge 13 commits into from

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Mar 1, 2024

A long-lived PR for testing .NET 9 until the stable release in November 2024. net9.0 is explicitly not being added as a new TFM for the packages we ship to NuGet.org.

Changes include:

  • Update to the .NET 9 SDK.
  • Target net8.0 and net9.0 in tests, samples and benchmarks.
  • Remove net6.0 and net7.0 targets from tests, samples and benchmarks as they will both be out-of-support by November 2023.
  • Force docfx to use .NET 9 SDK.
  • Fix new IDE0034 warning.

@martincostello martincostello added dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Mar 1, 2024
martincostello added a commit to martincostello/Polly that referenced this pull request Mar 1, 2024
- Fix CA1849 warning from updating snippets to .NET 8.
- Fix IDE0034 warning identified by the .NET 9 SDK in App-vNext#2003.
martincostello added a commit that referenced this pull request Mar 1, 2024
- Update various sample projects from `net7.0` to `net8.0`.
- Fix CA1849 warning from updating snippets to .NET 8.
- Fix IDE0034 warning identified by the .NET 9 SDK in #2003.
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@9720433). Click here to learn what that means.

❗ Current head 82a3c08 differs from pull request most recent head bee5858. Consider uploading reports for the commit bee5858 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2003   +/-   ##
=======================================
  Coverage        ?   83.65%           
=======================================
  Files           ?      311           
  Lines           ?     7096           
  Branches        ?     1050           
=======================================
  Hits            ?     5936           
  Misses          ?      789           
  Partials        ?      371           
Flag Coverage Δ
linux 83.65% <ø> (?)
macos 83.65% <ø> (?)
windows 83.65% <ø> (?)

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

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

Comment on lines 13 to 14
<!-- HACK net9.0 compilation for the tests fails due to missing Task.Delay() extension for TimeProvider without this reference -->
<PackageReference Include="Microsoft.Bcl.TimeProvider" Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net9.0'))" />
Copy link
Member Author

Choose a reason for hiding this comment

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

@martintmk Any idea what's going on with this? Without an explicit reference to this package, I can't get the tests to compile for net9.0.

The only change I can see that might explain it is this from dotnet/extensions#5058.

martincostello added a commit to martincostello/Polly that referenced this pull request Apr 12, 2024
Fix IDE0057 warnings identified in App-vNext#2003.
martincostello added a commit that referenced this pull request Apr 12, 2024
Fix IDE0057 warnings identified in #2003.
@martincostello martincostello force-pushed the dotnet-vnext branch 2 times, most recently from bee5858 to eeac2c2 Compare May 15, 2024 11:22
martincostello and others added 10 commits May 26, 2024 12:27
- Update to preview 1 of the .NET 9 SDK.
- Target `net8.0` and `net9.0` in tests, samples and benchmarks.
- Remove `net6.0` and `net7.0` targets from tests, samples and benchmarks.
- Simplify AoT properties.
- Only analyse for AoT for .NET 8+ to resolve new warning.
- Force docfx to use .NET 9 SDK.
- Fix new IDE0034 warning.
Just validate with `net9.0` to avoid complexity of publishing the AoT app twice when Polly will just use `net8.0` both times anyway.
Skip test that breaks the VSTest process in release mode for .NET 9.
Reduce coverage threshold while test skipped.
Add link to issue for skipped test.
Update to preview 2 of the .NET 9 SDK.
* Update .NET SDK

Update .NET SDK to version 9.0.100-preview.3.24204.13.

---
updated-dependencies:
- dependency-name: Microsoft.NET.Sdk
  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>

* Bump Microsoft.Extensions.TimeProvider.Testing

Bump Microsoft.Extensions.TimeProvider.Testing for .NET 9 preview 3.

---------

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>
Co-authored-by: Martin Costello <martin@martincostello.com>
- Fix incorrect IDE0057 fixes.
- Fix package references for `net9.0`.
- Fix `TimeProvider`-related extensions not appearing to work without a reference to `Microsoft.Bcl.TimeProvider`.
- Suppress xUnit1031 warnings.
Test no longer appears to fail with .NET 9 preview 3.
Accidentally deleted, rather than updated.
Fix missing `VersionOverride`.
Update to preview 4 of .NET 9.
Fix incorrect package version.
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 .NET Pull requests that update .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant