Async methods were implemented in #481 (comment) but I think the precompiler directives or somehow the nuget binding doesn't get them.
Sample csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.IO.Abstractions" Version="6.0.21" />
</ItemGroup>
</Project>
Sample code:
var lines = await new FileSystem().File.ReadAllLinesAsync(@"C:\file.txt")
I think the problem is simply that we're limited to NETCOREAPP2_0: https://github.com/fedoranimus/System.IO.Abstractions/blob/master/System.IO.Abstractions/FileBase.cs#L322 - you can probably instead use NETSTANDARD2_0 but I won't be able to test that right away. I won't be able to provide a PR as I'm off until the end of next week, but if no one took this issue when I'm back all provide one.
Async methods were implemented in #481 (comment) but I think the precompiler directives or somehow the nuget binding doesn't get them.
Sample csproj:
Sample code:
I think the problem is simply that we're limited to NETCOREAPP2_0: https://github.com/fedoranimus/System.IO.Abstractions/blob/master/System.IO.Abstractions/FileBase.cs#L322 - you can probably instead use
NETSTANDARD2_0but I won't be able to test that right away. I won't be able to provide a PR as I'm off until the end of next week, but if no one took this issue when I'm back all provide one.