I have a solution with a few projects. Remove unnecessary usings
is working in all projects except for one.
Why does the Remove unnecessary using
Needing to set the Warning Level
to 4 for code analyzers to fire is a Roslyn known issue.
Additionally, check your projects' Code Analysis rules (project properties > Code Analysis > Open). We had CS8019 and IDE0005 disabled, which prevents the code fix from being offered and the unused using(s) from being highlighted, respectively.
In the Build
section of the project properties
there is a setting called Errors and warnings
which should be 4
.