“Remove unnecessary usings” not working in Visual Studio 2015

前端 未结 2 1723
不思量自难忘°
不思量自难忘° 2021-01-11 22:52

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

相关标签:
2条回答
  • 2021-01-11 23:08

    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.

    0 讨论(0)
  • 2021-01-11 23:22

    In the Build section of the project properties there is a setting called Errors and warnings which should be 4.

    0 讨论(0)
提交回复
热议问题