Resharper-找到所有未使用的类 [英] Resharper- Find all unused classes
问题描述
我知道如何通过在文件上右击并选择查找用法选项中找到一个单一的文件中未使用的引用。有什么办法,我可以看到或得到的所有未使用的类或文件在我的项目?
首先启用分析错误在解决方案(在状态栏上的ReSharper的图标上单击右键)。
然后右键单击该解决方案节点,然后选择查找代码问题。在检查结果工具窗口,你可以通过发行方式组中,查找类型或类型成员从来没有使用过来获得所有未使用的类(还有更多未使用的符号)。
第二个选项(启用后,分析错误在解决方案),就是去任何未使用的类,打Alt + Enter键,选择为选项'类型或类型成员......视察|发现这种类型的所有代码问题|整个解决方案。
I know how to find unused references of a single file by right clicking on the file and selecting the "Find Usages" option. Is there any way I can see or get the list of all the unused classes or files in my project ?
First enable "Analyze Errors In Solution" (right-click on the Resharper icon in the status bar).
Then right-click the solution node and select "Find Code issues". In the "Inspection results" tool window you can group by "Issue type" and look for "Type or type member is never used" to get all unused classes (and many more unused symbols).
A second option (after enabling "Analyze Errors In Solution") is to go to any unused class, hit Alt+Enter, select "Options for 'Type or type member ...' inspection" | Find all code issues of this type | Entire solution.
这篇关于Resharper-找到所有未使用的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!