roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Show unused non-private type members when solution-wide analysis is off

Open mikadumont opened this issue 5 years ago • 2 comments

Customer Request Copying Here

Show unused non-private type members when solution-wide analysis is off. See how Resharper highlights the field UnusedMember but Visual Studio does not.

Expected Behavior:

Untitled

Actual Behavior:

Capture2

mikadumont avatar Apr 14 '19 19:04 mikadumont

Design Meeting Notes

  • This is a frequent asked we've received over the years.
  • Generally this would be valuable, but could have high performance sensitivity and will be using APIs outside of Roslyn.
    • Investigate using CodeLens Find All References lens to scope solution analysis using the Editor's lightbulb APIs.

kendrahavens avatar Oct 12 '20 21:10 kendrahavens

I think this is my issue as well. I set "Code Inspection: Type is never used" to show as Errors and I see the error in the code when the document is open in VS 2022, but it does not show up in the solution-wide analysis.

Even when the file with the error is open it still does not show up as an error in the bottom right corner of VS.

I was hoping to be able to see the errors in the error view so I can assess all the dead code from unused C# classes without needing to open every file.

image image

Mike-Logit avatar Feb 22 '24 07:02 Mike-Logit