dotnet / dotnet/sdk

System.Text.Encoding.CodePages giving warning will not be pruned when used with .net version 10

Open
#54,530 4 comments 1 reaction 0 assignees View on GitHub
Area-NetSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

**Version Used**: .net 10

**Steps to Reproduce**:

1. PackageReference Include="System.Text.Encoding.CodePages"
Version="10.0.0"
2. use targetFramework .net version 10
3.

A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into [.NET Lab](https://lab.razor.fyi/#csharp).

**Diagnostic Id**:

If this is a report about a bug in an analyzer, please include the diagnostic ID and message if possible (e.g. `"IDE0030: Use coalesce expression"`).

**Expected Behavior**:should not give error/warning

**Actual Behavior**: PackageReference System.Text.Encoding.CodePages will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by creating the minimal .NET 10 project described in the issue, adding System.Text.Encoding.CodePages version 10.0.0 and targeting .NET 10. Run the project build and observe the package-pruning warning. Done means the package is correctly recognized as necessary or unnecessary without producing the reported incorrect warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.