diff --git a/Directory.Build.props b/Directory.Build.props
index fd78f4f19..26b3cc5af 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -33,8 +33,4 @@
true
-
-
- $(DefineConstants);NETCORE31COMPATIBLE
-
diff --git a/src/ImageSharp/Memory/Allocators/Internals/Gen2GcCallback.cs b/src/ImageSharp/Memory/Allocators/Internals/Gen2GcCallback.cs
index 3a0479359..b0552936e 100644
--- a/src/ImageSharp/Memory/Allocators/Internals/Gen2GcCallback.cs
+++ b/src/ImageSharp/Memory/Allocators/Internals/Gen2GcCallback.cs
@@ -3,7 +3,7 @@
// Port of BCL internal utility:
// https://github.com/dotnet/runtime/blob/57bfe474518ab5b7cfe6bf7424a79ce3af9d6657/src/libraries/System.Private.CoreLib/src/System/Gen2GcCallback.cs
-#if NETCORE31COMPATIBLE
+#if NETCOREAPP3_1_OR_GREATER
using System;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
diff --git a/src/ImageSharp/Memory/Allocators/Internals/UniformUnmanagedMemoryPool.cs b/src/ImageSharp/Memory/Allocators/Internals/UniformUnmanagedMemoryPool.cs
index ced91fec7..78498b7ea 100644
--- a/src/ImageSharp/Memory/Allocators/Internals/UniformUnmanagedMemoryPool.cs
+++ b/src/ImageSharp/Memory/Allocators/Internals/UniformUnmanagedMemoryPool.cs
@@ -42,7 +42,7 @@ namespace SixLabors.ImageSharp.Memory.Internals
if (trimSettings.Enabled)
{
UpdateTimer(trimSettings, this);
-#if NETCORE31COMPATIBLE
+#if NETCOREAPP3_1_OR_GREATER || NETFRAMEWORK
Gen2GcCallback.Register(s => ((UniformUnmanagedMemoryPool)s).Trim(), this);
#endif
this.lastTrimTimestamp = Stopwatch.ElapsedMilliseconds;
@@ -328,7 +328,7 @@ namespace SixLabors.ImageSharp.Memory.Internals
private bool IsHighMemoryPressure()
{
-#if NETCORE31COMPATIBLE
+#if NETCOREAPP3_1_OR_GREATER
GCMemoryInfo memoryInfo = GC.GetGCMemoryInfo();
return memoryInfo.MemoryLoadBytes >= memoryInfo.HighMemoryLoadThresholdBytes * this.trimSettings.HighPressureThresholdRate;
#else
diff --git a/src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs b/src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs
index d9734baea..16a3cb73d 100644
--- a/src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs
+++ b/src/ImageSharp/Memory/Allocators/UniformUnmanagedMemoryPoolMemoryAllocator.cs
@@ -146,7 +146,7 @@ namespace SixLabors.ImageSharp.Memory
private static long GetDefaultMaxPoolSizeBytes()
{
-#if NETCORE31COMPATIBLE
+#if NETCOREAPP3_1_OR_GREATER
// On 64 bit .NET Core 3.1+, set the pool size to a portion of the total available memory.
// There is a bug in GC.GetGCMemoryInfo() on .NET 5 + 32 bit, making TotalAvailableMemoryBytes unreliable:
// https://github.com/dotnet/runtime/issues/55126#issuecomment-876779327
diff --git a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
index 6ac4923a4..471287006 100644
--- a/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
+++ b/tests/ImageSharp.Tests/ImageSharp.Tests.csproj
@@ -7,7 +7,6 @@
AnyCPU;x64;x86
SixLabors.ImageSharp.Tests
Debug;Release;Debug-InnerLoop;Release-InnerLoop
- $(DefineConstants);NETCORE31COMPATIBLE
diff --git a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs
index 84d64c757..75e57c62b 100644
--- a/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs
+++ b/tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs
@@ -90,7 +90,7 @@ namespace SixLabors.ImageSharp.Tests.Memory.Allocators
}
}
-#if NETCORE31COMPATIBLE
+#if NETCOREAPP3_1_OR_GREATER
public static readonly bool Is32BitProcess = !Environment.Is64BitProcess;
private static readonly List PressureArrays = new();