Skip to content

Commit 4e97a7c

Browse files
committed
Add target for .NET Standard 2.1
1 parent 86fc159 commit 4e97a7c

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

Microsoft.IO.RecyclableMemoryStream.sln

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.28803.156
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.IO.RecyclableMemoryStream", "src\Microsoft.IO.RecyclableMemoryStream.csproj", "{4B52F0CE-5F4C-43E7-A054-50CA0A502CF3}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.IO.RecyclableMemoryStream", "src\Microsoft.IO.RecyclableMemoryStream.csproj", "{4B52F0CE-5F4C-43E7-A054-50CA0A502CF3}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{419C9F3D-71CC-4F95-8324-E15CD0D1E754}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{419C9F3D-71CC-4F95-8324-E15CD0D1E754}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DF4A161A-7C52-46A2-A0ED-427C1C6F29AA}"
1111
ProjectSection(SolutionItems) = preProject
12+
global.json = global.json
1213
LICENSE = LICENSE
1314
README.md = README.md
1415
EndProjectSection
@@ -31,4 +32,7 @@ Global
3132
GlobalSection(SolutionProperties) = preSolution
3233
HideSolutionNode = FALSE
3334
EndGlobalSection
35+
GlobalSection(ExtensibilityGlobals) = postSolution
36+
SolutionGuid = {D5E147AF-721B-469D-AD77-A00A290340AC}
37+
EndGlobalSection
3438
EndGlobal

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "3.0.100-preview3-010431"
4+
}
5+
}

src/Microsoft.IO.RecyclableMemoryStream.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard1.4;net40;net45;netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>netstandard1.4;netstandard2.1;net40;net45;netcoreapp2.1</TargetFrameworks>
44
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
55
</PropertyGroup>
66
<!-- for assembly signing we use a magic variable coupled with a special build definition which skips UTs -->

src/RecyclableMemoryStream.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public int SafeRead(byte[] buffer, int offset, int count, ref int streamPosition
530530
return amountRead;
531531
}
532532

533-
#if NETCOREAPP2_1
533+
#if NETCOREAPP2_1 || NETSTANDARD2_1
534534
/// <summary>
535535
/// Reads from the current position into the provided buffer
536536
/// </summary>
@@ -640,7 +640,7 @@ public override void Write(byte[] buffer, int offset, int count)
640640
this.length = Math.Max(this.position, this.length);
641641
}
642642

643-
#if NETCOREAPP2_1
643+
#if NETCOREAPP2_1 || NETSTANDARD2_1
644644
/// <summary>
645645
/// Writes the buffer to the stream
646646
/// </summary>
@@ -898,7 +898,7 @@ private int InternalRead(byte[] buffer, int offset, int count, int fromPosition)
898898
return amountToCopy;
899899
}
900900

901-
#if NETCOREAPP2_1
901+
#if NETCOREAPP2_1 || NETSTANDARD2_1
902902
private int InternalRead(Span<byte> buffer, int fromPosition)
903903
{
904904
if (this.length - fromPosition <= 0)

0 commit comments

Comments
 (0)