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
19.02k stars 4.03k forks source link

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

Open mikadumont opened 5 years ago

mikadumont commented 5 years ago

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

kendrahavens commented 4 years ago

Design Meeting Notes

Mike-Logit commented 8 months ago

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