From 0f280d9a62979b1f45165a580340c1500c36e86c Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 21 Jan 2026 00:25:34 +0100 Subject: [PATCH] Lower minimum System.Memory version to 4.5.4 - Lowers the barrier for consumers on older environments. - System.Memory 4.5.4 is more widely transitively included than 4.5.5. - 4.5.4 remains the version with the highest download count, ensuring broad compatibility without requiring unnecessary upgrades. --- src/ApiBuilderTests/AssemblySizeTest.cs | 4 ++-- src/Polyfill/Polyfill.targets | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ApiBuilderTests/AssemblySizeTest.cs b/src/ApiBuilderTests/AssemblySizeTest.cs index bb00ea5d6..cd89091f4 100644 --- a/src/ApiBuilderTests/AssemblySizeTest.cs +++ b/src/ApiBuilderTests/AssemblySizeTest.cs @@ -164,7 +164,7 @@ public void MeasureAssemblySizes() {polyOptions} - + @@ -335,4 +335,4 @@ class SizeResult public long SizeWithStringInterpolation { get; init; } public long SizeWithNullability { get; init; } } -} \ No newline at end of file +} diff --git a/src/Polyfill/Polyfill.targets b/src/Polyfill/Polyfill.targets index 5ac19a8f9..27c442833 100644 --- a/src/Polyfill/Polyfill.targets +++ b/src/Polyfill/Polyfill.targets @@ -88,7 +88,7 @@ For example: @(ResolvedCompileFileDefinitions->WithMetadataValue('NuGetPackageId', 'System.Memory')->Metadata('NuGetPackageVersion')) $(DefineConstants);FeatureMemory + Condition="'$(MemoryVersion)' != '' AND $([MSBuild]::VersionGreaterThanOrEquals($(MemoryVersion), '4.5.4'))">$(DefineConstants);FeatureMemory $(DefineConstants);FeatureRuntimeInformation