diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs
index 4526d8a3..951a9073 100644
--- a/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs
+++ b/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs
@@ -2,13 +2,6 @@ using System;
namespace ComputeSharp.D2D1.Tests.Effects;
-#if !NET6_0_OR_GREATER
-internal static class MathF
-{
- public const float PI = (float)Math.PI;
-}
-#endif
-
[D2DInputCount(0)]
[D2DRequiresScenePosition]
[D2DShaderProfile(D2D1ShaderProfile.PixelShader50)]
diff --git a/tests/ComputeSharp.NuGet/Program.cs b/tests/ComputeSharp.NuGet/Program.cs
index c4424f36..3a8989b4 100644
--- a/tests/ComputeSharp.NuGet/Program.cs
+++ b/tests/ComputeSharp.NuGet/Program.cs
@@ -1,13 +1,9 @@
using System.Diagnostics;
using System.Linq;
-#if NET6_0_OR_GREATER
using System.Runtime.Versioning;
-#endif
using ComputeSharp;
-#if NET6_0_OR_GREATER
[assembly: SupportedOSPlatform("windows6.2")]
-#endif
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
diff --git a/tests/ComputeSharp.Pix.NuGet/Program.cs b/tests/ComputeSharp.Pix.NuGet/Program.cs
index 306c6d71..9bd8ef5f 100644
--- a/tests/ComputeSharp.Pix.NuGet/Program.cs
+++ b/tests/ComputeSharp.Pix.NuGet/Program.cs
@@ -1,13 +1,9 @@
using System.Diagnostics;
using System.Linq;
-#if NET6_0_OR_GREATER
using System.Runtime.Versioning;
-#endif
using ComputeSharp;
-#if NET6_0_OR_GREATER
[assembly: SupportedOSPlatform("windows6.2")]
-#endif
float[] array = Enumerable.Range(1, 100).Select(static i => (float)i).ToArray();
diff --git a/tests/ComputeSharp.Tests/Polyfills/RandomExtensions.cs b/tests/ComputeSharp.Tests/Polyfills/RandomExtensions.cs
deleted file mode 100644
index fa809217..00000000
--- a/tests/ComputeSharp.Tests/Polyfills/RandomExtensions.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-#if !NET6_0_OR_GREATER
-
-namespace System;
-
-///
-/// A type with some helper methods for the class.
-///
-internal static class RandomExtensions
-{
- ///
- /// Fills the elements of a specified span of bytes with random numbers.
- ///
- /// The target random instance.
- /// The array to be filled with random numbers.
- public static void NextBytes(this Random random, Span buffer)
- {
- byte[] array = new byte[buffer.Length];
-
- random.NextBytes(array);
-
- array.AsSpan().CopyTo(buffer);
- }
-}
-
-#endif
\ No newline at end of file