roslyn
roslyn copied to clipboard
Show unused non-private type members when solution-wide analysis is off
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:
Actual Behavior:
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.
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.