Support one version of System.Text.Encoding.CodePages
instead of
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
</ItemGroup>
For all frameworks
Starting with .NET Core 3.0, as far as I remember, the package comes with the sdk and there is no need to write separately in the project file
Although, maybe different platforms are not supported?
That would be even better! Less dependencies is nice!
Not sure what "package provided" means here
.NET: Core 1.0, Core 1.1, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
https://learn.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider?view=net-9.0
Not all variants support implicit restoring https://stackoverflow.com/a/79267054
So for example with .NET 8 it's 8 (package-provided) but also 8. That's unclear to me! With a package reference, it supports less?