UTF-unknown icon indicating copy to clipboard operation
UTF-unknown copied to clipboard

Support one version of System.Text.Encoding.CodePages

Open 304NotModified opened this issue 6 months ago • 5 comments

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

304NotModified avatar Aug 06 '25 22:08 304NotModified

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?

rstm-sf avatar Aug 07 '25 08:08 rstm-sf

That would be even better! Less dependencies is nice!

304NotModified avatar Aug 07 '25 08:08 304NotModified

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

304NotModified avatar Aug 07 '25 14:08 304NotModified

Not all variants support implicit restoring https://stackoverflow.com/a/79267054

rstm-sf avatar Aug 07 '25 20:08 rstm-sf

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?

304NotModified avatar Aug 07 '25 21:08 304NotModified