diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6ec91bf071d..a685791c15c 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,10 +7,10 @@
-
+
-
+
@@ -35,34 +35,18 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/bench/Polly.Benchmarks/Polly.Benchmarks.csproj b/bench/Polly.Benchmarks/Polly.Benchmarks.csproj
index 90755394d11..a4bc5febaaf 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
+ net10.0
enable
Benchmark
$(NoWarn);CA1822;IDE0060
diff --git a/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj b/bench/Polly.Core.Benchmarks/Polly.Core.Benchmarks.csproj
index d629c8db68d..3cf6e7f9350 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
+ net10.0
Polly
true
Benchmark
diff --git a/src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs b/src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
index d4795479fe7..1f87bf61999 100644
--- a/src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
+++ b/src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
@@ -274,7 +274,7 @@ private static bool IsDateTimeOverflow(DateTimeOffset utcNow, TimeSpan breakDura
return breakDuration > maxDifference;
}
-#if NET8_0_OR_GREATER
+#if NET
private void EnsureNotDisposed()
=> ObjectDisposedException.ThrowIf(_disposed, this);
#else
diff --git a/src/Polly.Core/CircuitBreaker/Controller/ScheduledTaskExecutor.cs b/src/Polly.Core/CircuitBreaker/Controller/ScheduledTaskExecutor.cs
index 651ded01310..f5976ef9cf1 100644
--- a/src/Polly.Core/CircuitBreaker/Controller/ScheduledTaskExecutor.cs
+++ b/src/Polly.Core/CircuitBreaker/Controller/ScheduledTaskExecutor.cs
@@ -25,7 +25,7 @@ public ScheduledTaskExecutor()
public Task ScheduleTask(Func taskFactory)
{
-#if NET8_0_OR_GREATER
+#if NET
ObjectDisposedException.ThrowIf(_disposed, this);
#else
if (_disposed)
diff --git a/src/Polly.Core/CompatibilitySuppressions.xml b/src/Polly.Core/CompatibilitySuppressions.xml
index ac7575c1ecd..e08b2188ef5 100644
--- a/src/Polly.Core/CompatibilitySuppressions.xml
+++ b/src/Polly.Core/CompatibilitySuppressions.xml
@@ -1,22 +1,92 @@
-
+
CP0002
M:Polly.CircuitBreaker.BrokenCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.Core.dll
- lib/net6.0/Polly.Core.dll
+ lib/net10.0/Polly.Core.dll
CP0002
M:Polly.CircuitBreaker.IsolatedCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.Core.dll
- lib/net6.0/Polly.Core.dll
+ lib/net10.0/Polly.Core.dll
CP0002
M:Polly.ExecutionRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.Core.dll
- lib/net6.0/Polly.Core.dll
+ lib/net10.0/Polly.Core.dll
+
+
+ CP0008
+ T:Polly.CircuitBreaker.BrokenCircuitException
+ lib/net462/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.IsolatedCircuitException
+ lib/net462/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.ExecutionRejectedException
+ lib/net462/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.Timeout.TimeoutRejectedException
+ lib/net462/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.CircuitState
+ lib/net6.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.DelayBackoffType
+ lib/net6.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.Telemetry.ResilienceEventSeverity
+ lib/net6.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.CircuitState
+ lib/net8.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.DelayBackoffType
+ lib/net8.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
+
+
+ CP0008
+ T:Polly.Telemetry.ResilienceEventSeverity
+ lib/net8.0/Polly.Core.dll
+ lib/netstandard2.0/Polly.Core.dll
+ true
\ No newline at end of file
diff --git a/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs b/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs
index bc00495036a..8dbf885048c 100644
--- a/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs
+++ b/src/Polly.Core/Hedging/Controller/HedgingExecutionContext.cs
@@ -124,7 +124,7 @@ public async ValueTask DisposeAsync()
return task;
}
-#if NET8_0_OR_GREATER
+#if NET
var whenAnyHedgedTask = WaitForTaskCompetitionAsync();
await whenAnyHedgedTask.WaitAsync(hedgingDelay, _timeProvider, PrimaryContext!.CancellationToken)
.ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing | (ContinueOnCapturedContext ? ConfigureAwaitOptions.ContinueOnCapturedContext : 0));
diff --git a/src/Polly.Core/Polly.Core.csproj b/src/Polly.Core/Polly.Core.csproj
index 20971fa76c5..ed31f20f4fc 100644
--- a/src/Polly.Core/Polly.Core.csproj
+++ b/src/Polly.Core/Polly.Core.csproj
@@ -1,7 +1,7 @@
- net10.0;net8.0;net6.0;netstandard2.0;net472;net462
+ net10.0;netstandard2.0;net472
Polly.Core
Polly
enable
@@ -11,7 +11,7 @@
true
true
-
+
true
@@ -30,13 +30,13 @@
-
+
-
+
diff --git a/src/Polly.Core/Utils/CancellationTokenSourcePool.Disposable.cs b/src/Polly.Core/Utils/CancellationTokenSourcePool.Disposable.cs
index e9754965f62..d880a8f235b 100644
--- a/src/Polly.Core/Utils/CancellationTokenSourcePool.Disposable.cs
+++ b/src/Polly.Core/Utils/CancellationTokenSourcePool.Disposable.cs
@@ -2,7 +2,7 @@ namespace Polly.Utils;
internal abstract partial class CancellationTokenSourcePool
{
-#if !NET8_0_OR_GREATER
+#if !NET
private sealed class DisposableCancellationTokenSourcePool : CancellationTokenSourcePool
{
private readonly TimeProvider _timeProvider;
diff --git a/src/Polly.Core/Utils/CancellationTokenSourcePool.Pooled.cs b/src/Polly.Core/Utils/CancellationTokenSourcePool.Pooled.cs
index 564976987ac..b13543baf8c 100644
--- a/src/Polly.Core/Utils/CancellationTokenSourcePool.Pooled.cs
+++ b/src/Polly.Core/Utils/CancellationTokenSourcePool.Pooled.cs
@@ -12,11 +12,7 @@ internal sealed class PooledCancellationTokenSourcePool : CancellationTokenSourc
public PooledCancellationTokenSourcePool(TimeProvider timeProvider) => _pool = new(
() =>
{
-#if NET8_0_OR_GREATER
return new CancellationTokenSource(System.Threading.Timeout.InfiniteTimeSpan, timeProvider);
-#else
- return new CancellationTokenSource();
-#endif
},
static cts => true);
diff --git a/src/Polly.Core/Utils/CancellationTokenSourcePool.cs b/src/Polly.Core/Utils/CancellationTokenSourcePool.cs
index b11767f0b07..9160ce9ee15 100644
--- a/src/Polly.Core/Utils/CancellationTokenSourcePool.cs
+++ b/src/Polly.Core/Utils/CancellationTokenSourcePool.cs
@@ -6,20 +6,13 @@ internal abstract partial class CancellationTokenSourcePool
{
public static CancellationTokenSourcePool Create(TimeProvider timeProvider)
{
-#if NET8_0_OR_GREATER
+#if NET
if (timeProvider == TimeProvider.System)
{
return PooledCancellationTokenSourcePool.SystemInstance;
}
return new PooledCancellationTokenSourcePool(timeProvider);
-#elif NET6_0_OR_GREATER
- if (timeProvider == TimeProvider.System)
- {
- return PooledCancellationTokenSourcePool.SystemInstance;
- }
-
- return new DisposableCancellationTokenSourcePool(timeProvider);
#else
return new DisposableCancellationTokenSourcePool(timeProvider);
#endif
diff --git a/src/Polly.Core/Utils/Guard.cs b/src/Polly.Core/Utils/Guard.cs
index b993395c6cf..dbe6c410cfb 100644
--- a/src/Polly.Core/Utils/Guard.cs
+++ b/src/Polly.Core/Utils/Guard.cs
@@ -9,7 +9,7 @@ internal static class Guard
public static T NotNull(T value, [CallerArgumentExpression("value")] string argumentName = "")
where T : class
{
-#if NET8_0_OR_GREATER
+#if NET
ArgumentNullException.ThrowIfNull(value, argumentName);
#else
if (value is null)
diff --git a/src/Polly.Core/Utils/Pipeline/ExecutionTrackingComponent.cs b/src/Polly.Core/Utils/Pipeline/ExecutionTrackingComponent.cs
index 7f415835279..f3e969d40d4 100644
--- a/src/Polly.Core/Utils/Pipeline/ExecutionTrackingComponent.cs
+++ b/src/Polly.Core/Utils/Pipeline/ExecutionTrackingComponent.cs
@@ -44,7 +44,7 @@ public override async ValueTask DisposeAsync()
// so we will do "dummy" retries until there are no more executions.
while (HasPendingExecutions)
{
-#if NET8_0_OR_GREATER
+#if NET
await Task.Delay(SleepDelay, _timeProvider).ConfigureAwait(false);
#else
await _timeProvider.Delay(SleepDelay).ConfigureAwait(false);
diff --git a/src/Polly.Core/Utils/TimeProviderExtensions.cs b/src/Polly.Core/Utils/TimeProviderExtensions.cs
index 8c7ecf66314..b0fe2c728c7 100644
--- a/src/Polly.Core/Utils/TimeProviderExtensions.cs
+++ b/src/Polly.Core/Utils/TimeProviderExtensions.cs
@@ -35,7 +35,7 @@ public static Task DelayAsync(this TimeProvider timeProvider, TimeSpan delay, Re
// the use of Thread.Sleep() here because it is not cancellable and to
// simplify the code. Sync-over-async is not a concern here because it
// only applies in the case of a resilience event and not on the hot path.
-#if NET8_0_OR_GREATER
+#if NET
Task.Delay(delay, timeProvider, context.CancellationToken).GetAwaiter().GetResult();
#else
timeProvider.Delay(delay, context.CancellationToken).GetAwaiter().GetResult();
@@ -45,7 +45,7 @@ public static Task DelayAsync(this TimeProvider timeProvider, TimeSpan delay, Re
return Task.CompletedTask;
}
-#if NET8_0_OR_GREATER
+#if NET
return Task.Delay(delay, timeProvider, context.CancellationToken);
#else
return timeProvider.Delay(delay, context.CancellationToken);
diff --git a/src/Polly.Extensions/Polly.Extensions.csproj b/src/Polly.Extensions/Polly.Extensions.csproj
index 03947097769..dcc1a6f3210 100644
--- a/src/Polly.Extensions/Polly.Extensions.csproj
+++ b/src/Polly.Extensions/Polly.Extensions.csproj
@@ -1,6 +1,6 @@
- net10.0;net8.0;net6.0;netstandard2.0;net472;net462
+ net10.0;netstandard2.0;net472
Polly.Extensions
Polly
enable
@@ -9,7 +9,7 @@
100
true
-
+
true
@@ -37,7 +37,7 @@
-
+
diff --git a/src/Polly.RateLimiting/CompatibilitySuppressions.xml b/src/Polly.RateLimiting/CompatibilitySuppressions.xml
new file mode 100644
index 00000000000..ecfb7af499e
--- /dev/null
+++ b/src/Polly.RateLimiting/CompatibilitySuppressions.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ CP0008
+ T:Polly.RateLimiting.RateLimiterRejectedException
+ lib/net462/Polly.RateLimiting.dll
+ lib/netstandard2.0/Polly.RateLimiting.dll
+ true
+
+
\ No newline at end of file
diff --git a/src/Polly.RateLimiting/Polly.RateLimiting.csproj b/src/Polly.RateLimiting/Polly.RateLimiting.csproj
index 84daf17b52d..938aae5fdc9 100644
--- a/src/Polly.RateLimiting/Polly.RateLimiting.csproj
+++ b/src/Polly.RateLimiting/Polly.RateLimiting.csproj
@@ -1,6 +1,6 @@
- net10.0;net8.0;net6.0;netstandard2.0;net472;net462
+ net10.0;netstandard2.0;net472
Polly.RateLimiting
Polly.RateLimiting
enable
@@ -9,7 +9,7 @@
100
true
-
+
true
diff --git a/src/Polly.Testing/Polly.Testing.csproj b/src/Polly.Testing/Polly.Testing.csproj
index 1e1cbcefe2e..74f356c661e 100644
--- a/src/Polly.Testing/Polly.Testing.csproj
+++ b/src/Polly.Testing/Polly.Testing.csproj
@@ -1,7 +1,7 @@
- net10.0;net8.0;netstandard2.0
+ net10.0;netstandard2.0
Polly.Testing
Polly.Testing
enable
diff --git a/src/Polly/CompatibilitySuppressions.xml b/src/Polly/CompatibilitySuppressions.xml
index ff409018bff..f0ab58d6e04 100644
--- a/src/Polly/CompatibilitySuppressions.xml
+++ b/src/Polly/CompatibilitySuppressions.xml
@@ -1,52 +1,136 @@
-
+
CP0002
M:Polly.Bulkhead.BulkheadRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net462/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.RateLimit.RateLimitRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.CircuitBreaker.BrokenCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net462/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.Bulkhead.BulkheadRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.CircuitBreaker.BrokenCircuitException`1.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.CircuitBreaker.BrokenCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.CircuitBreaker.IsolatedCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.CircuitBreaker.BrokenCircuitException`1.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.ExecutionRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.CircuitBreaker.IsolatedCircuitException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.RateLimit.RateLimitRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net10.0/Polly.dll
CP0002
- M:Polly.ExecutionRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
+ M:Polly.Bulkhead.BulkheadRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net472/Polly.dll
CP0002
M:Polly.RateLimit.RateLimitRejectedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
lib/netstandard2.0/Polly.dll
- lib/net6.0/Polly.dll
+ lib/net472/Polly.dll
+
+
+ CP0008
+ T:Polly.Bulkhead.BulkheadRejectedException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.BrokenCircuitException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.BrokenCircuitException`1
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.IsolatedCircuitException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.ExecutionRejectedException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.RateLimit.RateLimitRejectedException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.Timeout.TimeoutRejectedException
+ lib/net462/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.CircuitBreaker.CircuitState
+ lib/net6.0/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.ExceptionType
+ lib/net6.0/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.FaultType
+ lib/net6.0/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.OutcomeType
+ lib/net6.0/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
+
+
+ CP0008
+ T:Polly.Timeout.TimeoutStrategy
+ lib/net6.0/Polly.dll
+ lib/netstandard2.0/Polly.dll
+ true
-
+
\ No newline at end of file
diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj
index 6468d6529b6..022785a1c3b 100644
--- a/src/Polly/Polly.csproj
+++ b/src/Polly/Polly.csproj
@@ -1,7 +1,7 @@
- net10.0;net8.0;net6.0;netstandard2.0;net472;net462
+ net10.0;netstandard2.0;net472
Polly
true
Library
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Polly/Timeout/AsyncTimeoutEngine.cs b/src/Polly/Timeout/AsyncTimeoutEngine.cs
index 617d057e9bf..770e2301b78 100644
--- a/src/Polly/Timeout/AsyncTimeoutEngine.cs
+++ b/src/Polly/Timeout/AsyncTimeoutEngine.cs
@@ -59,7 +59,7 @@ internal static async Task ImplementationAsync(
// stryker disable once all : no means to test this
if (!combinedTokenSource.IsCancellationRequested && timeoutCancellationTokenSource.IsCancellationRequested)
{
-#if NET8_0_OR_GREATER
+#if NET
await combinedTokenSource.CancelAsync().ConfigureAwait(false);
#else
combinedTokenSource.Cancel();
diff --git a/test/Polly.Core.Tests/Hedging/HedgingResilienceStrategyTests.cs b/test/Polly.Core.Tests/Hedging/HedgingResilienceStrategyTests.cs
index 8f9ff5b642e..e6562769a97 100644
--- a/test/Polly.Core.Tests/Hedging/HedgingResilienceStrategyTests.cs
+++ b/test/Polly.Core.Tests/Hedging/HedgingResilienceStrategyTests.cs
@@ -158,7 +158,7 @@ public async Task ExecuteAsync_ShouldReturnAnyPossibleResult()
var result = await strategy.ExecuteAsync(_primaryTasks.SlowTask, CancellationToken);
result.ShouldNotBeNull();
-#if NET8_0_OR_GREATER
+#if NET
_timeProvider.TimerEntries.Count.ShouldBe(8);
#else
_timeProvider.TimerEntries.Count.ShouldBe(5);
diff --git a/test/Polly.Core.Tests/Hedging/PrimaryStringTasks.cs b/test/Polly.Core.Tests/Hedging/PrimaryStringTasks.cs
index 9b533694b8f..a19b095320f 100644
--- a/test/Polly.Core.Tests/Hedging/PrimaryStringTasks.cs
+++ b/test/Polly.Core.Tests/Hedging/PrimaryStringTasks.cs
@@ -17,7 +17,7 @@ public static ValueTask InstantTask() =>
public async ValueTask FastTask(CancellationToken token)
{
-#if NET8_0_OR_GREATER
+#if NET
await Task.Delay(TimeSpan.FromMilliseconds(10), _timeProvider, token);
#else
await _timeProvider.Delay(TimeSpan.FromMilliseconds(10), token);
@@ -27,7 +27,7 @@ public async ValueTask FastTask(CancellationToken token)
public async ValueTask SlowTask(CancellationToken token)
{
-#if NET8_0_OR_GREATER
+#if NET
await Task.Delay(TimeSpan.FromDays(1), _timeProvider, token);
#else
await _timeProvider.Delay(TimeSpan.FromDays(1), token);
diff --git a/test/Polly.Core.Tests/Polly.Core.Tests.csproj b/test/Polly.Core.Tests/Polly.Core.Tests.csproj
index f894012a1c7..55e33a5ce71 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
+ net10.0
$(TargetFrameworks);net481
false
Test
@@ -23,8 +23,8 @@
-
-
+
+
diff --git a/test/Polly.Extensions.Tests/Polly.Extensions.Tests.csproj b/test/Polly.Extensions.Tests/Polly.Extensions.Tests.csproj
index acc0f2b9349..b7eff8716b4 100644
--- a/test/Polly.Extensions.Tests/Polly.Extensions.Tests.csproj
+++ b/test/Polly.Extensions.Tests/Polly.Extensions.Tests.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net10.0
$(TargetFrameworks);net481
Test
enable
diff --git a/test/Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj b/test/Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj
index 9722f8973b4..0a4cf07cde6 100644
--- a/test/Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj
+++ b/test/Polly.RateLimiting.Tests/Polly.RateLimiting.Tests.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net10.0
$(TargetFrameworks);net481
Test
enable
diff --git a/test/Polly.Specs/Polly.Specs.csproj b/test/Polly.Specs/Polly.Specs.csproj
index e9ac8b0226a..2600dee56d7 100644
--- a/test/Polly.Specs/Polly.Specs.csproj
+++ b/test/Polly.Specs/Polly.Specs.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net10.0
$(TargetFrameworks);net481
enable
Exe
diff --git a/test/Polly.TestUtils/FakeTelemetryListener.cs b/test/Polly.TestUtils/FakeTelemetryListener.cs
index 817e731df5e..6fa76df8e52 100644
--- a/test/Polly.TestUtils/FakeTelemetryListener.cs
+++ b/test/Polly.TestUtils/FakeTelemetryListener.cs
@@ -1,6 +1,6 @@
using Polly.Telemetry;
-#if !NET10_0_OR_GREATER
+#if !NET
#pragma warning disable SA1121
using Lock = System.Object;
#endif
diff --git a/test/Polly.TestUtils/Polly.TestUtils.csproj b/test/Polly.TestUtils/Polly.TestUtils.csproj
index 344ec0af3cf..c91f9188556 100644
--- a/test/Polly.TestUtils/Polly.TestUtils.csproj
+++ b/test/Polly.TestUtils/Polly.TestUtils.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net10.0
$(TargetFrameworks);net481
Library
enable
diff --git a/test/Polly.Testing.Tests/Polly.Testing.Tests.csproj b/test/Polly.Testing.Tests/Polly.Testing.Tests.csproj
index 0018379cbfc..389272ac4c8 100644
--- a/test/Polly.Testing.Tests/Polly.Testing.Tests.csproj
+++ b/test/Polly.Testing.Tests/Polly.Testing.Tests.csproj
@@ -1,6 +1,6 @@
- net10.0;net9.0;net8.0
+ net10.0
$(TargetFrameworks);net481
Test
enable