Merge pull request #512 from adamhathcock/fix-codepages

Attempt Windows reference fix
This commit is contained in:
Adam Hathcock
2020-05-22 13:44:10 +01:00
committed by GitHub
4 changed files with 9 additions and 7 deletions

View File

@@ -12,6 +12,6 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
dotnet-version: 3.1.202
- name: Run the Cake script
uses: ecampidoglio/cake-action@master

View File

@@ -32,10 +32,12 @@ namespace SharpCompress.Common
Password = Encoding.GetEncoding(437);
}
#if NETSTANDARD1_3 || NETSTANDARD2_0 || NETSTANDARD2_1
static ArchiveEncoding()
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
#endif
public string Decode(byte[] bytes)
{

View File

@@ -24,11 +24,11 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.1' ">
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'net46' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.1" />
</ItemGroup>
</Project>

View File

@@ -12,10 +12,10 @@
<ProjectReference Include="..\..\src\SharpCompress\SharpCompress.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.12" />
<PackageReference Include="Xunit.SkippableFact" Version="1.4.8" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
</ItemGroup>
</Project>