diff --git a/Directory.Packages.props b/Directory.Packages.props
index 7eb7af1b174..918a9a78388 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -13,11 +13,11 @@
-
-
+
+
-
-
+
+
@@ -66,4 +66,12 @@
+
+
+
+
+
+
+
+
diff --git a/bench/Polly.Benchmarks/Cache.cs b/bench/Polly.Benchmarks/Cache.cs
index 2ec48d559ed..328cb5681fb 100644
--- a/bench/Polly.Benchmarks/Cache.cs
+++ b/bench/Polly.Benchmarks/Cache.cs
@@ -14,8 +14,8 @@ public class Cache
private static readonly Policy SyncPolicyHit = Policy.Cache(CacheProvider, TimeSpan.MaxValue);
private static readonly AsyncPolicy AsyncPolicyHit = Policy.CacheAsync(CacheProvider, TimeSpan.MaxValue);
- private static readonly Context HitContext = new(nameof(HitContext));
- private static readonly Context MissContext = new(nameof(MissContext));
+ private static readonly Context HitContext = [with(nameof(HitContext))];
+ private static readonly Context MissContext = [with(nameof(MissContext))];
[GlobalSetup]
public Task GlobalSetup()
diff --git a/bench/Polly.Benchmarks/Polly.Benchmarks.csproj b/bench/Polly.Benchmarks/Polly.Benchmarks.csproj
index 90755394d11..fea722f2f1d 100644
--- a/bench/Polly.Benchmarks/Polly.Benchmarks.csproj
+++ b/bench/Polly.Benchmarks/Polly.Benchmarks.csproj
@@ -2,7 +2,7 @@
false
Exe
- net10.0;net9.0;net8.0
+ net11.0;net10.0
enable
Benchmark
$(NoWarn);CA1822;IDE0060
@@ -13,7 +13,7 @@
-
+
diff --git a/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj b/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj
index d629c8db68d..e90b23d5335 100644
--- a/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj
+++ b/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net11.0;net10.0
Polly
true
Benchmark
diff --git a/bench/benchmarks.ps1 b/bench/benchmarks.ps1
index 0932369625d..524c8e305e0 100644
--- a/bench/benchmarks.ps1
+++ b/bench/benchmarks.ps1
@@ -20,6 +20,6 @@ if ($Interactive -ne $true) {
$project = Join-Path "Polly.Core.Benchmarks" "Polly.Core.Benchmarks.csproj"
-dotnet run --configuration $Configuration --framework net10.0 --project $project $additionalArgs
+dotnet run --configuration $Configuration --framework net11.0 --project $project $additionalArgs
exit $LASTEXITCODE
diff --git a/eng/Common.props b/eng/Common.props
index bf90aaa13dc..d8f01c777a8 100644
--- a/eng/Common.props
+++ b/eng/Common.props
@@ -2,8 +2,9 @@
true
$(MSBuildThisFileDirectory)..\Polly.snk
+ true
enable
- latest
+ preview
direct
true
0024000004800000940000000602000000240000525341310004000001000100150819e3494f97263a3abdd18e5e0c47b04e6c0ede44a6c51d50b545d403ceeb7cbb32d18dbbbcdd1d88a87d7b73206b126be134b0609c36aa3cb31dd2e47e393293102809b8d77f192f3188618a42e651c14ebf05f8f5b76aa91b431642b23497ed82b65d63791cdaa31d4282a2d6cbabc3fe0745b6b6690c417cabf6a1349c
diff --git a/eng/Test.targets b/eng/Test.targets
index 4058f40c299..53a6c1afa17 100644
--- a/eng/Test.targets
+++ b/eng/Test.targets
@@ -5,6 +5,11 @@
true
+
+
+ $(Features);runtime-async=on
+
+
diff --git a/global.json b/global.json
index 6b5ad33c94e..82e846a1ad0 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "10.0.301",
+ "version": "11.0.100-preview.5.26302.115",
"allowPrerelease": false
},
"msbuild-sdks": {
diff --git a/samples/Chaos/Chaos.csproj b/samples/Chaos/Chaos.csproj
index 3166caa94a0..2229b12a9bd 100644
--- a/samples/Chaos/Chaos.csproj
+++ b/samples/Chaos/Chaos.csproj
@@ -1,7 +1,7 @@
- net10.0
+ net11.0
Chaos
diff --git a/samples/DependencyInjection/DependencyInjection.csproj b/samples/DependencyInjection/DependencyInjection.csproj
index d136db346b8..0ae185705a2 100644
--- a/samples/DependencyInjection/DependencyInjection.csproj
+++ b/samples/DependencyInjection/DependencyInjection.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/Extensibility/Extensibility.csproj b/samples/Extensibility/Extensibility.csproj
index f12bcc31035..de611ca35ad 100644
--- a/samples/Extensibility/Extensibility.csproj
+++ b/samples/Extensibility/Extensibility.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/GenericPipelines/GenericPipelines.csproj b/samples/GenericPipelines/GenericPipelines.csproj
index 861604f1783..1435bdca1e1 100644
--- a/samples/GenericPipelines/GenericPipelines.csproj
+++ b/samples/GenericPipelines/GenericPipelines.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/Intro.FSharp/Intro.FSharp.fsproj b/samples/Intro.FSharp/Intro.FSharp.fsproj
index f88a1c3415f..5b56c764a59 100644
--- a/samples/Intro.FSharp/Intro.FSharp.fsproj
+++ b/samples/Intro.FSharp/Intro.FSharp.fsproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj b/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj
index f12bcc31035..de611ca35ad 100644
--- a/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj
+++ b/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/Intro/Intro.csproj b/samples/Intro/Intro.csproj
index f12bcc31035..de611ca35ad 100644
--- a/samples/Intro/Intro.csproj
+++ b/samples/Intro/Intro.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/samples/Retries/Retries.csproj b/samples/Retries/Retries.csproj
index f12bcc31035..de611ca35ad 100644
--- a/samples/Retries/Retries.csproj
+++ b/samples/Retries/Retries.csproj
@@ -2,7 +2,7 @@
Exe
- net10.0
+ net11.0
diff --git a/src/Polly/AsyncPolicy.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.ExecuteOverloads.cs
index 39da8ec96d1..b0a65d714ed 100644
--- a/src/Polly/AsyncPolicy.ExecuteOverloads.cs
+++ b/src/Polly/AsyncPolicy.ExecuteOverloads.cs
@@ -21,7 +21,7 @@ public Task ExecuteAsync(Func action) =>
/// A which completes when is registered.
[DebuggerStepThrough]
public Task ExecuteAsync(Func action, IDictionary contextData) =>
- ExecuteAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAsync((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy.
@@ -52,7 +52,7 @@ public Task ExecuteAsync(Func action, CancellationToken
/// A which completes when is registered.
[DebuggerStepThrough]
public Task ExecuteAsync(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy.
@@ -88,7 +88,7 @@ public Task ExecuteAsync(Func action, CancellationToken
/// A which completes when is registered.
[DebuggerStepThrough]
public Task ExecuteAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy.
@@ -131,7 +131,7 @@ public Task ExecuteAsync(Func> action) =>
/// The value returned by the action.
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData) =>
- ExecuteAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAsync((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -165,7 +165,7 @@ public Task ExecuteAsync(Func
/// The value returned by the action.
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -204,7 +204,7 @@ public Task ExecuteAsync(Func
/// Thrown when is .
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -251,7 +251,7 @@ public Task ExecuteAndCaptureAsync(Func action) =>
/// Thrown when is .
[DebuggerStepThrough]
public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData) =>
- ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the captured result.
@@ -283,7 +283,7 @@ public Task ExecuteAndCaptureAsync(Func a
/// Thrown when is .
[DebuggerStepThrough]
public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the captured result.
@@ -319,7 +319,7 @@ public Task ExecuteAndCaptureAsync(Func a
/// Thrown when is .
[DebuggerStepThrough]
public Task ExecuteAndCaptureAsync(Func action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the captured result.
@@ -363,7 +363,7 @@ public Task> ExecuteAndCaptureAsync(FuncThrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) =>
- ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -398,7 +398,7 @@ public Task> ExecuteAndCaptureAsync(FuncThrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -437,7 +437,7 @@ public Task> ExecuteAndCaptureAsync(FuncThrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
diff --git a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs
index 5d103f32f74..3727bc080e2 100644
--- a/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs
+++ b/src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs
@@ -21,7 +21,7 @@ public Task ExecuteAsync(Func> action) =>
/// The value returned by the action.
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData) =>
- ExecuteAsync((ctx, _) => action(ctx), new Context(contextData), CancellationToken.None, DefaultContinueOnCapturedContext);
+ ExecuteAsync((ctx, _) => action(ctx), [with(contextData)], CancellationToken.None, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -64,7 +64,7 @@ public Task ExecuteAsync(Func> action,
/// The value returned by the action.
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -88,7 +88,7 @@ public Task ExecuteAsync(Func
/// Thrown when is .
[DebuggerStepThrough]
public Task ExecuteAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -132,7 +132,7 @@ public Task> ExecuteAndCaptureAsync(Func> ac
/// Thrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData) =>
- ExecuteAndCaptureAsync((ctx, _) => action(ctx), new Context(contextData), CancellationToken.None, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync((ctx, _) => action(ctx), [with(contextData)], CancellationToken.None, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -176,7 +176,7 @@ public Task> ExecuteAndCaptureAsync(FuncThrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, DefaultContinueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, DefaultContinueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
@@ -200,7 +200,7 @@ public Task> ExecuteAndCaptureAsync(FuncThrown when is .
[DebuggerStepThrough]
public Task> ExecuteAndCaptureAsync(Func> action, IDictionary contextData, CancellationToken cancellationToken, bool continueOnCapturedContext) =>
- ExecuteAndCaptureAsync(action, new Context(contextData), cancellationToken, continueOnCapturedContext);
+ ExecuteAndCaptureAsync(action, [with(contextData)], cancellationToken, continueOnCapturedContext);
///
/// Executes the specified asynchronous action within the policy and returns the result.
diff --git a/src/Polly/Context.Dictionary.cs b/src/Polly/Context.Dictionary.cs
index fc43e1df132..6407762c897 100644
--- a/src/Polly/Context.Dictionary.cs
+++ b/src/Polly/Context.Dictionary.cs
@@ -36,7 +36,7 @@ internal Context(IDictionary contextData)
throw new ArgumentNullException(nameof(contextData));
}
- WrappedDictionary = new Dictionary(contextData);
+ WrappedDictionary = [with(contextData)];
}
#region IDictionary implementation
diff --git a/src/Polly/Policy.ExecuteOverloads.cs b/src/Polly/Policy.ExecuteOverloads.cs
index 103d2d4d7c2..de2b98e62b3 100644
--- a/src/Polly/Policy.ExecuteOverloads.cs
+++ b/src/Polly/Policy.ExecuteOverloads.cs
@@ -19,7 +19,7 @@ public void Execute(Action action) =>
/// Arbitrary data that is passed to the exception policy.
[DebuggerStepThrough]
public void Execute(Action action, IDictionary contextData) =>
- Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ Execute((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy.
@@ -48,7 +48,7 @@ public void Execute(Action action, CancellationToken cancella
/// Thrown when is .
[DebuggerStepThrough]
public void Execute(Action action, IDictionary contextData, CancellationToken cancellationToken) =>
- Execute(action, new Context(contextData), cancellationToken);
+ Execute(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy.
@@ -98,7 +98,7 @@ public TResult Execute(Func action) =>
/// Thrown when is .
[DebuggerStepThrough]
public TResult Execute(Func action, IDictionary contextData) =>
- Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ Execute((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy and returns the result.
@@ -134,7 +134,7 @@ public TResult Execute(Func action, Cancell
/// Thrown when is .
[DebuggerStepThrough]
public TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- Execute(action, new Context(contextData), cancellationToken);
+ Execute(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy and returns the result.
@@ -188,7 +188,7 @@ public PolicyResult ExecuteAndCapture(Action action) =>
/// Thrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData) =>
- ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ ExecuteAndCapture((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
@@ -220,7 +220,7 @@ public PolicyResult ExecuteAndCapture(Action action, Cancella
/// Thrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Action action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCapture(action, new Context(contextData), cancellationToken);
+ ExecuteAndCapture(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
@@ -272,7 +272,7 @@ public PolicyResult ExecuteAndCapture(Func action) =>
/// Thrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) =>
- ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ ExecuteAndCapture((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
@@ -307,7 +307,7 @@ public PolicyResult ExecuteAndCapture(FuncThrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCapture(action, new Context(contextData), cancellationToken);
+ ExecuteAndCapture(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
diff --git a/src/Polly/Policy.TResult.ExecuteOverloads.cs b/src/Polly/Policy.TResult.ExecuteOverloads.cs
index 4f2b7a93f5f..08b8e3308cb 100644
--- a/src/Polly/Policy.TResult.ExecuteOverloads.cs
+++ b/src/Polly/Policy.TResult.ExecuteOverloads.cs
@@ -22,7 +22,7 @@ public TResult Execute(Func action) =>
/// Thrown when is .
[DebuggerStepThrough]
public TResult Execute(Func action, IDictionary contextData) =>
- Execute((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ Execute((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy and returns the result.
@@ -55,7 +55,7 @@ public TResult Execute(Func action, CancellationToke
/// Thrown when is .
[DebuggerStepThrough]
public TResult Execute(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- Execute(action, new Context(contextData), cancellationToken);
+ Execute(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy and returns the result.
@@ -106,7 +106,7 @@ public PolicyResult ExecuteAndCapture(Func action) =>
/// Thrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData) =>
- ExecuteAndCapture((ctx, _) => action(ctx), new Context(contextData), DefaultCancellationToken);
+ ExecuteAndCapture((ctx, _) => action(ctx), [with(contextData)], DefaultCancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
@@ -139,7 +139,7 @@ public PolicyResult ExecuteAndCapture(Func
/// Thrown when is .
[DebuggerStepThrough]
public PolicyResult ExecuteAndCapture(Func action, IDictionary contextData, CancellationToken cancellationToken) =>
- ExecuteAndCapture(action, new Context(contextData), cancellationToken);
+ ExecuteAndCapture(action, [with(contextData)], cancellationToken);
///
/// Executes the specified action within the policy and returns the captured result.
diff --git a/src/Snippets/Snippets.csproj b/src/Snippets/Snippets.csproj
index f9743050c13..58ebe2819e1 100644
--- a/src/Snippets/Snippets.csproj
+++ b/src/Snippets/Snippets.csproj
@@ -15,7 +15,7 @@
Library
Snippets
false
- net10.0
+ net11.0
diff --git a/test/Polly.AotTest/Polly.AotTest.csproj b/test/Polly.AotTest/Polly.AotTest.csproj
index bf9bd32369c..462ee1c5286 100644
--- a/test/Polly.AotTest/Polly.AotTest.csproj
+++ b/test/Polly.AotTest/Polly.AotTest.csproj
@@ -5,7 +5,7 @@
true
true
true
- net10.0
+ net11.0
diff --git a/test/Polly.Core.Tests/Polly.Core.Tests.csproj b/test/Polly.Core.Tests/Polly.Core.Tests.csproj
index 5105ea208e1..825558018a1 100644
--- a/test/Polly.Core.Tests/Polly.Core.Tests.csproj
+++ b/test/Polly.Core.Tests/Polly.Core.Tests.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net11.0;net10.0
$(TargetFrameworks);net481
false
Test
@@ -20,7 +20,7 @@
-
+
diff --git a/test/Polly.Core.Tests/Utils/ObjectPoolTests.cs b/test/Polly.Core.Tests/Utils/ObjectPoolTests.cs
index a08e275f734..fb698d00356 100644
--- a/test/Polly.Core.Tests/Utils/ObjectPoolTests.cs
+++ b/test/Polly.Core.Tests/Utils/ObjectPoolTests.cs
@@ -102,7 +102,7 @@ private static List