From 7f6bddd7d71521f91c281ace16ea382d8c55f3a5 Mon Sep 17 00:00:00 2001 From: Christian Rondeau Date: Tue, 27 Aug 2019 21:08:21 -0400 Subject: [PATCH 1/5] Support netstandard2.1 --- .../FileSystemTests.cs | 2 +- .../MockFileAppendAllLinesTests.cs | 4 ++-- .../MockFileAppendAllTextTests.cs | 4 ++-- .../MockFileReadAllBytesTests.cs | 4 ++-- .../MockFileReadAllLinesTests.cs | 4 ++-- .../MockFileWriteAllBytesTests.cs | 4 ++-- .../MockFileWriteAllLinesTests.cs | 4 ++-- .../MockFileWriteAllTextTests.cs | 4 ++-- .../MockFile.cs | 16 ++++++++-------- ...ystem.IO.Abstractions.TestingHelpers.csproj | 4 ++-- System.IO.Abstractions/FileBase.cs | 18 +++++++++--------- System.IO.Abstractions/FileWrapper.cs | 18 +++++++++--------- System.IO.Abstractions/IFile.cs | 18 +++++++++--------- .../System.IO.Abstractions.csproj | 4 ++-- 14 files changed, 54 insertions(+), 54 deletions(-) diff --git a/System.IO.Abstractions.TestingHelpers.Tests/FileSystemTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/FileSystemTests.cs index a609dc71d..6dcab0f43 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/FileSystemTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/FileSystemTests.cs @@ -20,7 +20,7 @@ public void Is_Serializable() } #endif -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public void Mock_File_Succeeds() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllLinesTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllLinesTests.cs index 9bd7b9b64..bab1cf07a 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllLinesTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllLinesTests.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using XFS = System.IO.Abstractions.TestingHelpers.MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -123,7 +123,7 @@ public void MockFile_AppendAllLines_ShouldThrowArgumentNullExceptionIfEncodingIs Assert.That(exception.ParamName, Is.EqualTo("encoding")); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public async Task MockFile_AppendAllLinesAsync_ShouldPersistNewLinesToExistingFile() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllTextTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllTextTests.cs index 56bdec17f..3130bb063 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllTextTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileAppendAllTextTests.cs @@ -9,7 +9,7 @@ namespace System.IO.Abstractions.TestingHelpers.Tests using XFS = MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -158,7 +158,7 @@ public void MockFile_AppendAllText_ShouldWorkWithRelativePath() Assert.That(fileSystem.File.Exists(file)); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public async Task MockFile_AppendAllTextAsync_ShouldPersistNewText() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllBytesTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllBytesTests.cs index c9e80b73e..9cee93cd4 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllBytesTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllBytesTests.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using XFS = System.IO.Abstractions.TestingHelpers.MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -64,7 +64,7 @@ public void MockFile_ReadAllBytes_ShouldTolerateAltDirectorySeparatorInPath() Assert.AreEqual(data, fileSystem.File.ReadAllBytes(altPath)); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public async Task MockFile_ReadAllBytesAsync_ShouldReturnOriginalByteData() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllLinesTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllLinesTests.cs index c4b69023c..343d9ab98 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllLinesTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileReadAllLinesTests.cs @@ -8,7 +8,7 @@ namespace System.IO.Abstractions.TestingHelpers.Tests using XFS = MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -71,7 +71,7 @@ public void MockFile_ReadAllLines_NotExistingFile_ThrowsCorrectFileNotFoundExcep Assert.That(exception.Message, Is.EqualTo("Could not find file '" + absentFileNameFullPath + "'.")); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public async Task MockFile_ReadAllLinesAsync_ShouldReturnOriginalTextData() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllBytesTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllBytesTests.cs index 35896f383..05d414696 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllBytesTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllBytesTests.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using XFS = System.IO.Abstractions.TestingHelpers.MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -85,7 +85,7 @@ public void MockFile_WriteAllBytes_ShouldThrowAnArgumentNullExceptionIfBytesAreN Assert.That(exception.ParamName, Is.EqualTo("bytes")); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public void MockFile_WriteAllBytesAsync_ShouldThrowDirectoryNotFoundExceptionIfPathDoesNotExists() { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllLinesTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllLinesTests.cs index 727284514..5f2802e0e 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllLinesTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllLinesTests.cs @@ -195,7 +195,7 @@ public static IEnumerable ForContentsIsNull } } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public static IEnumerable ForDifferentEncodingAsync { get @@ -485,7 +485,7 @@ public void MockFile_WriteAllLinesGeneric_ShouldThrowAnArgumentNullExceptionIfCo Assert.That(exception.ParamName, Is.EqualTo("contents")); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [TestCaseSource(typeof(TestDataForWriteAllLines), "ForDifferentEncodingAsync")] public void MockFile_WriteAllLinesAsyncGeneric_ShouldWriteTheCorrectContent(IMockFileDataAccessor fileSystem, Action action, string expectedContent) { diff --git a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllTextTests.cs b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllTextTests.cs index bf839a4fc..33d7a3d7b 100644 --- a/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllTextTests.cs +++ b/System.IO.Abstractions.TestingHelpers.Tests/MockFileWriteAllTextTests.cs @@ -8,7 +8,7 @@ using XFS = MockUnixSupport; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; #endif @@ -227,7 +227,7 @@ public void MockFile_WriteAllTextMultipleLines_ShouldWriteTextFileToMemoryFileSy fileSystem.GetFile(path).TextContents); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 [Test] public async Task MockFile_WriteAllTextAsync_ShouldWriteTextFileToMemoryFileSystem() { diff --git a/System.IO.Abstractions.TestingHelpers/MockFile.cs b/System.IO.Abstractions.TestingHelpers/MockFile.cs index d4f591baf..0bb571280 100644 --- a/System.IO.Abstractions.TestingHelpers/MockFile.cs +++ b/System.IO.Abstractions.TestingHelpers/MockFile.cs @@ -39,7 +39,7 @@ public override void AppendAllLines(string path, IEnumerable contents, E AppendAllText(path, concatContents, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task AppendAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken = default(CancellationToken)) { AppendAllLines(path, contents); @@ -82,7 +82,7 @@ public override void AppendAllText(string path, string contents, Encoding encodi } } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task AppendAllTextAsync(string path, string contents, CancellationToken cancellationToken = default(CancellationToken)) { AppendAllText(path, contents); @@ -491,7 +491,7 @@ public override byte[] ReadAllBytes(string path) return mockFileDataAccessor.GetFile(path).Contents; } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllBytesAsync(string path, CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(ReadAllBytes(path)); @@ -534,7 +534,7 @@ public override string[] ReadAllLines(string path, Encoding encoding) .SplitLines(); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllLinesAsync(string path, CancellationToken cancellationToken = default(CancellationToken)) { return Task.FromResult(ReadAllLines(path)); @@ -570,7 +570,7 @@ public override string ReadAllText(string path, Encoding encoding) return ReadAllTextInternal(path, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllTextAsync(string path, CancellationToken cancellationToken) { return Task.FromResult(ReadAllText(path)); @@ -752,7 +752,7 @@ public override void WriteAllBytes(string path, byte[] bytes) mockFileDataAccessor.AddFile(path, new MockFileData(bytes)); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken) { WriteAllBytes(path, bytes); @@ -947,7 +947,7 @@ public override void WriteAllLines(string path, string[] contents, Encoding enco WriteAllLines(path, new List(contents), encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken) { WriteAllLines(path, contents); @@ -1056,7 +1056,7 @@ public override void WriteAllText(string path, string contents, Encoding encodin mockFileDataAccessor.AddFile(path, data); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllTextAsync(string path, string contents, CancellationToken cancellationToken) { WriteAllText(path, contents); diff --git a/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj b/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj index 1da2cca64..9def19c84 100644 --- a/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj +++ b/System.IO.Abstractions.TestingHelpers/System.IO.Abstractions.TestingHelpers.csproj @@ -1,6 +1,6 @@  - netstandard1.4;netstandard2.0;netcoreapp2.0 + netstandard1.4;netstandard2.0;netstandard2.1;netcoreapp2.0 $(TargetFrameworks);net40 System.IO.Abstractions.TestingHelpers A set of pre-built mocks to help when testing file system interactions. @@ -26,7 +26,7 @@ - + 4.5.0 diff --git a/System.IO.Abstractions/FileBase.cs b/System.IO.Abstractions/FileBase.cs index 49cdf90d2..ae01b7102 100644 --- a/System.IO.Abstractions/FileBase.cs +++ b/System.IO.Abstractions/FileBase.cs @@ -2,7 +2,7 @@ using System.Security.AccessControl; using System.Text; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; using System.Threading; #endif @@ -32,7 +32,7 @@ internal FileBase() { } /// public abstract void AppendAllLines(string path, IEnumerable contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task AppendAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken); @@ -46,7 +46,7 @@ internal FileBase() { } /// public abstract void AppendAllText(string path, string contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task AppendAllTextAsync(String path, String contents, CancellationToken cancellationToken); @@ -308,7 +308,7 @@ internal FileBase() { } /// public abstract byte[] ReadAllBytes(string path); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task ReadAllBytesAsync(string path, CancellationToken cancellationToken); #endif @@ -319,7 +319,7 @@ internal FileBase() { } /// public abstract string[] ReadAllLines(string path, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task ReadAllLinesAsync(string path, CancellationToken cancellationToken); @@ -333,7 +333,7 @@ internal FileBase() { } /// public abstract string ReadAllText(string path, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task ReadAllTextAsync(string path, CancellationToken cancellationToken); @@ -446,7 +446,7 @@ internal FileBase() { } /// /// -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken); #endif @@ -610,7 +610,7 @@ internal FileBase() { } /// /// -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task WriteAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken); @@ -658,7 +658,7 @@ internal FileBase() { } /// public abstract void WriteAllText(string path, string contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// public abstract Task WriteAllTextAsync(string path, string contents, CancellationToken cancellationToken); diff --git a/System.IO.Abstractions/FileWrapper.cs b/System.IO.Abstractions/FileWrapper.cs index a7d0bbeab..5f26a251d 100644 --- a/System.IO.Abstractions/FileWrapper.cs +++ b/System.IO.Abstractions/FileWrapper.cs @@ -2,7 +2,7 @@ using System.Security.AccessControl; using System.Text; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; using System.Threading; #endif @@ -27,7 +27,7 @@ public override void AppendAllLines(string path, IEnumerable contents, E File.AppendAllLines(path, contents, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task AppendAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken) { return File.AppendAllLinesAsync(path, contents, cancellationToken); @@ -49,7 +49,7 @@ public override void AppendAllText(string path, string contents, Encoding encodi File.AppendAllText(path, contents, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task AppendAllTextAsync(string path, string contents, CancellationToken cancellationToken) { return File.AppendAllTextAsync(path, contents, cancellationToken); @@ -224,7 +224,7 @@ public override byte[] ReadAllBytes(string path) return File.ReadAllBytes(path); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllBytesAsync(string path, CancellationToken cancellationToken) { return File.ReadAllBytesAsync(path, cancellationToken); @@ -241,7 +241,7 @@ public override string[] ReadAllLines(string path, Encoding encoding) return File.ReadAllLines(path, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllLinesAsync(string path, CancellationToken cancellationToken) { return File.ReadAllLinesAsync(path, cancellationToken); @@ -263,7 +263,7 @@ public override string ReadAllText(string path, Encoding encoding) return File.ReadAllText(path, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task ReadAllTextAsync(string path, CancellationToken cancellationToken) { return File.ReadAllTextAsync(path, cancellationToken); @@ -371,7 +371,7 @@ public override void WriteAllBytes(string path, byte[] bytes) File.WriteAllBytes(path, bytes); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken) { return File.WriteAllBytesAsync(path, bytes, cancellationToken); @@ -545,7 +545,7 @@ public override void WriteAllLines(string path, string[] contents, Encoding enco File.WriteAllLines(path, contents, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken) { return File.WriteAllLinesAsync(path, contents, cancellationToken); @@ -639,7 +639,7 @@ public override void WriteAllText(string path, string contents, Encoding encodin File.WriteAllText(path, contents, encoding); } -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 public override Task WriteAllTextAsync(string path, string contents, CancellationToken cancellationToken) { return File.WriteAllTextAsync(path, contents, cancellationToken); diff --git a/System.IO.Abstractions/IFile.cs b/System.IO.Abstractions/IFile.cs index b60f7dcd7..c5c4b6a54 100644 --- a/System.IO.Abstractions/IFile.cs +++ b/System.IO.Abstractions/IFile.cs @@ -2,7 +2,7 @@ using System.Security.AccessControl; using System.Text; -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 using System.Threading.Tasks; using System.Threading; #endif @@ -20,7 +20,7 @@ public interface IFile void AppendAllLines(string path, IEnumerable contents); /// void AppendAllLines(string path, IEnumerable contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task AppendAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -30,7 +30,7 @@ public interface IFile void AppendAllText(string path, string contents); /// void AppendAllText(string path, string contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task AppendAllTextAsync(String path, String contents, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -100,7 +100,7 @@ public interface IFile Stream OpenWrite(string path); /// byte[] ReadAllBytes(string path); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task ReadAllBytesAsync(string path, CancellationToken cancellationToken = default(CancellationToken)); #endif @@ -108,7 +108,7 @@ public interface IFile string[] ReadAllLines(string path); /// string[] ReadAllLines(string path, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task ReadAllLinesAsync(string path, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -118,7 +118,7 @@ public interface IFile string ReadAllText(string path); /// string ReadAllText(string path, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task ReadAllTextAsync(string path, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -152,7 +152,7 @@ public interface IFile void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc); /// void WriteAllBytes(string path, byte[] bytes); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken = default(CancellationToken)); #endif @@ -164,7 +164,7 @@ public interface IFile void WriteAllLines(string path, string[] contents); /// void WriteAllLines(string path, string[] contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task WriteAllLinesAsync(string path, IEnumerable contents, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -178,7 +178,7 @@ public interface IFile void WriteAllText(string path, string contents); /// void WriteAllText(string path, string contents, Encoding encoding); -#if NETCOREAPP2_0 +#if NETCOREAPP2_0 || NETSTANDARD2_1 /// Task WriteAllTextAsync(string path, string contents, CancellationToken cancellationToken = default(CancellationToken)); /// diff --git a/System.IO.Abstractions/System.IO.Abstractions.csproj b/System.IO.Abstractions/System.IO.Abstractions.csproj index ccca30110..d8625092a 100644 --- a/System.IO.Abstractions/System.IO.Abstractions.csproj +++ b/System.IO.Abstractions/System.IO.Abstractions.csproj @@ -1,7 +1,7 @@  - netstandard1.4;netstandard2.0;netcoreapp2.0 + netstandard1.4;netstandard2.0;netcoreapp2.0;netstandard2.1 $(TargetFrameworks);net40 Tatham Oddie @@ -23,7 +23,7 @@ True - + 4.5.0 From 9d8869754b06b4840003a24264fabcc780e77932 Mon Sep 17 00:00:00 2001 From: Christian Rondeau Date: Tue, 27 Aug 2019 21:11:33 -0400 Subject: [PATCH 2/5] Fix CS0419 on cref due to ReadOnlySpan --- System.IO.Abstractions/IPath.cs | 16 ++++++++-------- System.IO.Abstractions/PathBase.cs | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/System.IO.Abstractions/IPath.cs b/System.IO.Abstractions/IPath.cs index 3f694f045..2d6651d81 100644 --- a/System.IO.Abstractions/IPath.cs +++ b/System.IO.Abstractions/IPath.cs @@ -25,21 +25,21 @@ public interface IPath string Combine(string path1, string path2, string path3); /// string Combine(string path1, string path2, string path3, string path4); - /// + /// string GetDirectoryName(string path); - /// + /// string GetExtension(string path); - /// + /// string GetFileName(string path); - /// + /// string GetFileNameWithoutExtension(string path); - /// + /// string GetFullPath(string path); /// char[] GetInvalidFileNameChars(); /// char[] GetInvalidPathChars(); - /// + /// string GetPathRoot(string path); /// string GetRandomFileName(); @@ -47,9 +47,9 @@ public interface IPath string GetTempFileName(); /// string GetTempPath(); - /// + /// bool HasExtension(string path); - /// + /// bool IsPathRooted(string path); } } \ No newline at end of file diff --git a/System.IO.Abstractions/PathBase.cs b/System.IO.Abstractions/PathBase.cs index 18a523728..6db320dba 100644 --- a/System.IO.Abstractions/PathBase.cs +++ b/System.IO.Abstractions/PathBase.cs @@ -50,19 +50,19 @@ internal PathBase() { } /// public abstract string Combine(string path1, string path2, string path3, string path4); - /// + /// public abstract string GetDirectoryName(string path); - /// + /// public abstract string GetExtension(string path); - /// + /// public abstract string GetFileName(string path); - /// + /// public abstract string GetFileNameWithoutExtension(string path); - /// + /// public abstract string GetFullPath(string path); /// @@ -71,7 +71,7 @@ internal PathBase() { } /// public abstract char[] GetInvalidPathChars(); - /// + /// public abstract string GetPathRoot(string path); /// @@ -83,10 +83,10 @@ internal PathBase() { } /// public abstract string GetTempPath(); - /// + /// public abstract bool HasExtension(string path); - /// + /// public abstract bool IsPathRooted(string path); } } From 46798a551fc91166cb1800377f301a79510c2237 Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Mon, 9 Sep 2019 15:57:26 +0200 Subject: [PATCH 3/5] Use VS 2019 Preview image --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 91b883f6d..27faf4c15 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ image: -- Visual Studio 2017 +- Visual Studio 2019 Preview - Ubuntu configuration: Release From 9d1ad2880be949d84de41ce86dce3b69913ecebe Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 25 Sep 2019 07:08:03 +0200 Subject: [PATCH 4/5] Switch CI to VS 2019 image --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 27faf4c15..36c79baec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ image: -- Visual Studio 2019 Preview +- Visual Studio 2019 - Ubuntu configuration: Release From 15018a982343e7b1f4b191e17de23314a134024a Mon Sep 17 00:00:00 2001 From: Florian Greinacher Date: Wed, 25 Sep 2019 07:35:56 +0200 Subject: [PATCH 5/5] Dump base version to 7.0 Adding new methods to our public interfaces is a breaking change for implementors that should be visible to consumers. --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 8110f0363..a9d25bcf8 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "6.0", + "version": "7.0", "assemblyVersion": { "precision": "major" },