Skip to content

Commit dfc3310

Browse files
ericstjlewing
andauthored
Bring back Microsoft.BCL.Memory netstandard2.1 facade (#108245)
* Bring back Microsoft.BCL.Memory netstandard2.1 facade * Reorder TargetFrameworks Co-authored-by: Larry Ewing <lewing@microsoft.com> --------- Co-authored-by: Larry Ewing <lewing@microsoft.com>
1 parent d22c74d commit dfc3310

2 files changed

Lines changed: 6 additions & 24 deletions

File tree

src/libraries/Microsoft.Bcl.Memory/src/CompatibilitySuppressions.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/libraries/Microsoft.Bcl.Memory/src/Microsoft.Bcl.Memory.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
4+
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<DefineConstants>$(DefineConstants);MICROSOFT_BCL_MEMORY</DefineConstants>
77
<IsPackable>true</IsPackable>
@@ -13,7 +13,7 @@
1313
<OmitResources Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">true</OmitResources>
1414
</PropertyGroup>
1515

16-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
16+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
1717
<Compile Include="Microsoft.Bcl.Memory.Forwards.cs" />
1818
</ItemGroup>
1919

@@ -27,15 +27,15 @@
2727
<Compile Include="$(CoreLibSharedDir)System\Buffers\Text\Base64Url\Base64UrlValidator.cs" Link="System\Buffers\Text\Base64Url\Base64UrlValidator.cs" />
2828
</ItemGroup>
2929

30-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
30+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
3131
<Compile Include="$(CoreLibSharedDir)System\Index.cs" />
3232
<Compile Include="$(CoreLibSharedDir)System\Range.cs" />
3333
<Compile Include="$(CoreLibSharedDir)System\Numerics\Hashing\HashHelpers.cs" />
3434
</ItemGroup>
3535

36-
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
37-
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
38-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
36+
<ItemGroup>
37+
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))" />
38+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3939
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
4040
</ItemGroup>
4141

0 commit comments

Comments
 (0)