diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 477b04a1c..d49db0746 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,6 +17,16 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
+ - name: Setup .NET Core 2.1
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: "2.1.x"
+ - name: Setup .NET Core 3.1
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: "3.1.x"
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
- name: Run tests
run: dotnet test --collect:"XPlat Code Coverage"
- name: Upload coverage
@@ -31,6 +41,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
- uses: actions/download-artifact@v2
with:
name: Code coverage ubuntu-latest
@@ -64,6 +76,8 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v
- name: Create packages
run: dotnet pack --configuration Release --output ./packages
- name: Upload a Build Artifact
@@ -81,6 +95,8 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
- uses: actions/download-artifact@v2
with:
name: NuGet packages
diff --git a/Directory.Build.props b/Directory.Build.props
index 27b7e146a..0c016a902 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -8,7 +8,10 @@
true
snupkg
8.0
- $(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS
+ testing
+ https://github.com/System-IO-Abstractions/System.IO.Abstractions
+ MIT
+ $(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONSFEATURE_PATH_JOIN_WITH_SPAN
diff --git a/benchmarks/System.IO.Abstractions.Benchmarks/System.IO.Abstractions.Benchmarks.csproj b/benchmarks/System.IO.Abstractions.Benchmarks/System.IO.Abstractions.Benchmarks.csproj
index 6874eb189..6cb94912f 100644
--- a/benchmarks/System.IO.Abstractions.Benchmarks/System.IO.Abstractions.Benchmarks.csproj
+++ b/benchmarks/System.IO.Abstractions.Benchmarks/System.IO.Abstractions.Benchmarks.csproj
@@ -3,7 +3,7 @@
System.IO.Abstractions.Benchmarks
System.IO.Abstractions.Benchmarks
Bencharmks comparisons.
- netcoreapp3.1;net461
+ net5.0;netcoreapp3.1;net461
https://github.com/System-IO-Abstractions/System.IO.Abstractions
MIT
testing
diff --git a/global.json b/global.json
index 3acb9fdbd..a46dc9b06 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "3.1.300",
- "rollForward": "latestMinor"
+ "version": "5.0.100",
+ "rollForward": "latestFeature"
}
}
diff --git a/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj b/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj
index ce27c683d..c100295ec 100644
--- a/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj
+++ b/src/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj
@@ -3,10 +3,7 @@
System.IO.Abstractions.TestingHelpers
System.IO.Abstractions.TestingHelpers
A set of pre-built mocks to help when testing file system interactions.
- netstandard2.1;netstandard2.0;net461
- https://github.com/System-IO-Abstractions/System.IO.Abstractions
- MIT
- testing
+ net5.0;netstandard2.1;netstandard2.0;net461
diff --git a/src/System.IO.Abstractions/System.IO.Abstractions.csproj b/src/System.IO.Abstractions/System.IO.Abstractions.csproj
index 2909becd9..3e5010bff 100644
--- a/src/System.IO.Abstractions/System.IO.Abstractions.csproj
+++ b/src/System.IO.Abstractions/System.IO.Abstractions.csproj
@@ -3,15 +3,14 @@
System.IO.Abstractions
System.IO.Abstractions
A set of abstractions to help make file system interactions testable.
- netstandard2.1;netstandard2.0;net461
- https://github.com/System-IO-Abstractions/System.IO.Abstractions
- MIT
- testing
- $(DefineConstants);FEATURE_ASYNC_FILE;FEATURE_ENUMERATION_OPTIONS;FEATURE_ADVANCED_PATH_OPERATIONS;FEATURE_PATH_JOIN_WITH_SPAN
+ net5.0;netstandard2.1;netstandard2.0;net461
-
+
+
+
+
all
diff --git a/tests/System.IO.Abstractions.TestingHelpers.Tests/System.IO.Abstractions.TestingHelpers.Tests.csproj b/tests/System.IO.Abstractions.TestingHelpers.Tests/System.IO.Abstractions.TestingHelpers.Tests.csproj
index 235b3171d..5c2e1d424 100644
--- a/tests/System.IO.Abstractions.TestingHelpers.Tests/System.IO.Abstractions.TestingHelpers.Tests.csproj
+++ b/tests/System.IO.Abstractions.TestingHelpers.Tests/System.IO.Abstractions.TestingHelpers.Tests.csproj
@@ -1,6 +1,6 @@
- netcoreapp3.1;netcoreapp2.1
+ net5.0;netcoreapp3.1;netcoreapp2.1
$(TargetFrameworks);net461
The unit tests for our pre-built mocks
System.IO.Abstractions.TestingHelpers.Tests
diff --git a/tests/System.IO.Abstractions.Tests/ApiParityTests.cs b/tests/System.IO.Abstractions.Tests/ApiParityTests.cs
index b6ca22666..644d8655a 100644
--- a/tests/System.IO.Abstractions.Tests/ApiParityTests.cs
+++ b/tests/System.IO.Abstractions.Tests/ApiParityTests.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using NUnit.Framework;
using Snapshooter;
using Snapshooter.NUnit;
@@ -92,9 +91,11 @@ public ApiDiff(IEnumerable extraMembers, IEnumerable missingMemb
#if NETCOREAPP3_1
private const string snapshotSuffix = ".NET Core 3.1";
#elif NETCOREAPP2_1
- private const string snapshotSuffix = ".NET Core 2.1";
+ private const string snapshotSuffix = ".NET Core 2.1";
#elif NET461
- private const string snapshotSuffix = ".NET Framework 4.6.1";
+ private const string snapshotSuffix = ".NET Framework 4.6.1";
+#elif NET5_0
+ private const string snapshotSuffix = ".NET 5.0";
#else
#error Unknown target framework.
#endif
diff --git a/tests/System.IO.Abstractions.Tests/System.IO.Abstractions.Tests.csproj b/tests/System.IO.Abstractions.Tests/System.IO.Abstractions.Tests.csproj
index 58a726b4c..4947a4e07 100644
--- a/tests/System.IO.Abstractions.Tests/System.IO.Abstractions.Tests.csproj
+++ b/tests/System.IO.Abstractions.Tests/System.IO.Abstractions.Tests.csproj
@@ -1,6 +1,6 @@
- netcoreapp3.1;netcoreapp2.1
+ net5.0;netcoreapp3.1;netcoreapp2.1
$(TargetFrameworks);net461
The unit tests for our the core abstractions
System.IO.Abstractions.Tests
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DirectoryInfo_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DirectoryInfo_.NET 5.0.snap
new file mode 100644
index 000000000..a7e18d8c3
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DirectoryInfo_.NET 5.0.snap
@@ -0,0 +1,14 @@
+{
+ "ExtraMembers": [
+ "System.Security.AccessControl.DirectorySecurity GetAccessControl()",
+ "System.Security.AccessControl.DirectorySecurity GetAccessControl(System.Security.AccessControl.AccessControlSections)",
+ "Void Create(System.Security.AccessControl.DirectorySecurity)",
+ "Void SetAccessControl(System.Security.AccessControl.DirectorySecurity)"
+ ],
+ "MissingMembers": [
+ "System.Object GetLifetimeService()",
+ "System.Object InitializeLifetimeService()",
+ "Void .ctor(System.String)",
+ "Void GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)"
+ ]
+}
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Directory_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Directory_.NET 5.0.snap
new file mode 100644
index 000000000..ca0811fbe
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Directory_.NET 5.0.snap
@@ -0,0 +1,12 @@
+{
+ "ExtraMembers": [
+ "System.IO.Abstractions.IDirectoryInfo CreateDirectory(System.String, System.Security.AccessControl.DirectorySecurity)",
+ "System.Security.AccessControl.DirectorySecurity GetAccessControl(System.String)",
+ "System.Security.AccessControl.DirectorySecurity GetAccessControl(System.String, System.Security.AccessControl.AccessControlSections)",
+ "Void SetAccessControl(System.String, System.Security.AccessControl.DirectorySecurity)"
+ ],
+ "MissingMembers": [
+ "System.String[] GetFileSystemEntries(System.String, System.String, System.IO.EnumerationOptions)",
+ "System.String[] GetFileSystemEntries(System.String, System.String, System.IO.SearchOption)"
+ ]
+}
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DriveInfo_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DriveInfo_.NET 5.0.snap
new file mode 100644
index 000000000..8c885b472
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.DriveInfo_.NET 5.0.snap
@@ -0,0 +1,7 @@
+{
+ "ExtraMembers": [],
+ "MissingMembers": [
+ "System.IO.Abstractions.IDriveInfo[] GetDrives()",
+ "Void .ctor(System.String)"
+ ]
+}
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.FileInfo_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.FileInfo_.NET 5.0.snap
new file mode 100644
index 000000000..ae8e3379d
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.FileInfo_.NET 5.0.snap
@@ -0,0 +1,14 @@
+{
+ "ExtraMembers": [
+ "System.Security.AccessControl.FileSecurity GetAccessControl()",
+ "System.Security.AccessControl.FileSecurity GetAccessControl(System.Security.AccessControl.AccessControlSections)",
+ "Void SetAccessControl(System.Security.AccessControl.FileSecurity)"
+ ],
+ "MissingMembers": [
+ "System.Object GetLifetimeService()",
+ "System.Object InitializeLifetimeService()",
+ "Void .ctor(System.String)",
+ "Void GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)",
+ "Void MoveTo(System.String, Boolean)"
+ ]
+}
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.File_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.File_.NET 5.0.snap
new file mode 100644
index 000000000..1b942add5
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.File_.NET 5.0.snap
@@ -0,0 +1,12 @@
+{
+ "ExtraMembers": [
+ "System.Security.AccessControl.FileSecurity GetAccessControl(System.String)",
+ "System.Security.AccessControl.FileSecurity GetAccessControl(System.String, System.Security.AccessControl.AccessControlSections)",
+ "System.Threading.Tasks.Task WriteAllLinesAsync(System.String, System.String[], System.Text.Encoding, System.Threading.CancellationToken)",
+ "System.Threading.Tasks.Task WriteAllLinesAsync(System.String, System.String[], System.Threading.CancellationToken)",
+ "Void SetAccessControl(System.String, System.Security.AccessControl.FileSecurity)"
+ ],
+ "MissingMembers": [
+ "Void Move(System.String, System.String, Boolean)"
+ ]
+}
diff --git a/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Path_.NET 5.0.snap b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Path_.NET 5.0.snap
new file mode 100644
index 000000000..99bae9707
--- /dev/null
+++ b/tests/System.IO.Abstractions.Tests/__snapshots__/ApiParityTests.Path_.NET 5.0.snap
@@ -0,0 +1,28 @@
+{
+ "ExtraMembers": [
+ "Char get_AltDirectorySeparatorChar()",
+ "Char get_DirectorySeparatorChar()",
+ "Char get_PathSeparator()",
+ "Char get_VolumeSeparatorChar()",
+ "Char[] get_InvalidPathChars()"
+ ],
+ "MissingMembers": [
+ "Boolean EndsInDirectorySeparator(System.ReadOnlySpan`1[System.Char])",
+ "Boolean EndsInDirectorySeparator(System.String)",
+ "Boolean HasExtension(System.ReadOnlySpan`1[System.Char])",
+ "Boolean IsPathFullyQualified(System.ReadOnlySpan`1[System.Char])",
+ "Boolean IsPathRooted(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] GetDirectoryName(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] GetExtension(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] GetFileName(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] GetFileNameWithoutExtension(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] GetPathRoot(System.ReadOnlySpan`1[System.Char])",
+ "System.ReadOnlySpan`1[System.Char] TrimEndingDirectorySeparator(System.ReadOnlySpan`1[System.Char])",
+ "System.String Join(System.ReadOnlySpan`1[System.Char], System.ReadOnlySpan`1[System.Char], System.ReadOnlySpan`1[System.Char], System.ReadOnlySpan`1[System.Char])",
+ "System.String Join(System.String, System.String)",
+ "System.String Join(System.String, System.String, System.String)",
+ "System.String Join(System.String, System.String, System.String, System.String)",
+ "System.String Join(System.String[])",
+ "System.String TrimEndingDirectorySeparator(System.String)"
+ ]
+}