Skip to content

Commit 520ee38

Browse files
Update to .NET 9 SDK (#2003)
- Build with the .NET 9 SDK. - Add tests TFM for `net9.0`. - Remove tests for `net6.0` TFM. - Run workflows on PRs to `dotnet-vnext` branch. - Only audit direct NuGet dependencies. - Fix IDE0022 warning. - Temporarily disable some tests that are failing in GitHub Actions. - Add usage of `[DebuggerDisableUserUnhandledExceptions]` to avoid newer versions of the Visual Studio debugger for breaking for exceptions on async code paths we are intentionally handling. - Bump version to 8.5.0.
1 parent 7567acc commit 520ee38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+143
-57
lines changed

.github/workflows/actions-lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ name: actions-lint
22

33
on:
44
push:
5-
branches: [ main, release/* ]
5+
branches:
6+
- main
7+
- release/*
68
paths-ignore:
79
- '**/*.gitattributes'
810
- '**/*.gitignore'
911
- '**/*.md'
1012
pull_request:
11-
branches: [ main, release/* ]
13+
branches:
14+
- main
15+
- release/*
16+
- dotnet-vnext
1217
workflow_dispatch:
1318

1419
permissions:

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: build
22

33
on:
44
push:
5-
branches: [ main, release/* ]
5+
branches:
6+
- main
7+
- release/*
68
tags: [ '*' ]
79
pull_request:
8-
branches: [ main, release/* ]
10+
branches:
11+
- main
12+
- release/*
13+
- dotnet-vnext
914
workflow_dispatch:
1015

1116
env:

.github/workflows/dependency-review.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: dependency-review
22

33
on:
44
pull_request:
5-
branches: [ main, release/* ]
5+
branches:
6+
- main
7+
- release/*
8+
- dotnet-vnext
69

710
permissions:
811
contents: read

.github/workflows/gh-pages.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ name: github-pages
22

33
on:
44
push:
5-
branches: [ main, release/* ]
5+
branches:
6+
- main
7+
- release/*
68
pull_request:
7-
branches: [ main, release/* ]
9+
branches:
10+
- main
11+
- release/*
12+
- dotnet-vnext
813
workflow_dispatch:
914

1015
permissions:
@@ -14,6 +19,7 @@ jobs:
1419

1520
build-docs:
1621
runs-on: ubuntu-latest
22+
timeout-minutes: 20
1723

1824
steps:
1925

@@ -37,6 +43,8 @@ jobs:
3743
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
3844

3945
- name: Generate documentation
46+
env:
47+
DOTNET_ROLL_FORWARD: LatestMajor
4048
run: |
4149
dotnet tool restore
4250
dotnet build --configuration Release /p:SKIP_POLLY_ANALYZERS=true

.github/workflows/on-push-do-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: on-push-do-docs
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [ main ]
66
paths: [ "src/Snippets/**" ]
77
workflow_dispatch:
88

.github/workflows/updater-approve.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: updater-approve
22

33
on:
44
pull_request:
5-
branches: [ main, release/* ]
5+
branches:
6+
- main
7+
- release/*
8+
- dotnet-vnext
69

710
permissions:
811
contents: read

Directory.Packages.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<PollyVersion>8.4.2</PollyVersion>
55
<MicrosoftExtensionsVersion>8.0.0</MicrosoftExtensionsVersion>
66
</PropertyGroup>
7+
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net9.0'))">
8+
<MicrosoftExtensionsVersion>9.0.0</MicrosoftExtensionsVersion>
9+
<MicrosoftExtensionsTimeProviderVersion>9.0.0</MicrosoftExtensionsTimeProviderVersion>
10+
</PropertyGroup>
711
<ItemGroup>
812
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
913
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
@@ -41,6 +45,7 @@
4145
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(MicrosoftExtensionsVersion)" />
4246
<PackageVersion Include="System.Threading.RateLimiting" Version="$(MicrosoftExtensionsVersion)" />
4347
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
48+
<PackageVersion Include="System.Text.Json" Version="9.0.0" />
4449
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
4550
<PackageVersion Include="xunit" Version="2.9.2" />
4651
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />

bench/Polly.Benchmarks/Polly.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<IsPackable>false</IsPackable>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
66
<Nullable>enable</Nullable>
77
<ProjectType>Benchmark</ProjectType>
88
<NoWarn>$(NoWarn);CA1822;IDE0060</NoWarn>

bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
44
<RootNamespace>Polly</RootNamespace>
55
<ImplicitUsings>true</ImplicitUsings>
66
<ProjectType>Benchmark</ProjectType>

bench/benchmarks.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ if ($Interactive -ne $true) {
2020

2121
$project = Join-Path "Polly.Core.Benchmarks" "Polly.Core.Benchmarks.csproj"
2222

23-
dotnet run --configuration $Configuration --framework net8.0 --project $project $additionalArgs
23+
dotnet run --configuration $Configuration --framework net9.0 --project $project $additionalArgs
2424

2525
exit $LASTEXITCODE

0 commit comments

Comments
 (0)