dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.96k stars 4.03k forks source link

Implicit Usings don't appear greyed out like other unused usings #72776

Closed james1301 closed 2 months ago

james1301 commented 6 months ago

Version Used:

17.9.5

Steps to Reproduce:

  1. Create a .Net 8.0 C# Console app
  2. On the Project make sure Implicit Usings are enabled
  3. Add a using to the main class for system

A minimal repro, with source-code provided, is ideal. Using sharplab is preferred for compiler/language issues whenever possible.

Diagnostic Id:

N/A

Expected Behavior:

Using becomes greyed out like other usings that are unused in the class

Actual Behavior:

Using appears like it is required

Cosifne commented 3 months ago

Might related to IOrganizeImportsService or Semantic classification.

CyrusNajmabadi commented 2 months ago

Not repro:

image