简体   繁体   English

如何通过ReSharper查找所有未使用using语句?

[英]How can I find all unsed using statements with ReSharper?

I want to find all unused using statements in my Xamarin C# project using Visual Studio and ReSharper. 我想使用Visual Studio和ReSharper在我的Xamarin C#项目中查找所有未使用的using语句。

How can I do this? 我怎样才能做到这一点?

You can see the unused using statements as warnings in ReSharper Errors/Warnings in Solution window. 您可以在“解决方案”窗口的“ ReSharper 错误/警告”中看到未使用的using语句作为警告。

You can open it by, 您可以通过以下方式打开它

  • Navigating to ReSharper | Windows | Solution Errors 导航到ReSharper | Windows | Solution Errors ReSharper | Windows | Solution Errors ReSharper | Windows | Solution Errors or, ReSharper | Windows | Solution Errors
  • By double clicking on the Errors/Warnings link at the bottom right corner of Visual Studio 通过双击Visual Studio右下角的“错误/警告”链接 Visual Studio右下角的错误/警告链接

    In the appearing window, click on ⚠️ icon to show warnings. 在出现的窗口中,单击⚠️图标以显示警告。 If there are unused using statements there will be warnings listed. 如果有未使用的using语句,则会列出警告。 Expand the warnings to find using statement related warnings. 展开警告找到using语句相关的警告。

    使用与语句相关的警告

    Double clicking on the warning will take you to the relevant file. 双击警告将带您到相关文件。 The unused using statement can be found in gray colour. 使用的using语句可以找到灰色。

Note: Enable Solution Wide Analysis and Reanalyze All to make sure you want miss anything. 注意:启用“ 解决方案范围分析”和“ 全部重新分析” ,以确保您不想错过任何内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Resharper测试运行程序在“全部运行”中找不到连接字符串 - Resharper test runner can't find connection string on Run All ReSharper或VS-如何在所有子类中自动生成新抽象成员的默认实现? - ReSharper or VS - how can I auto generate a default implementation of a new abstract member in all sub-classes? 有没有办法使用ReSharper在.NET项目中查找所有未使用的代码? - Is there a way to find all unused code in a .NET project using ReSharper? 我在哪里可以找到漂亮的Dark ReSharper(颜色标识符=开)主题? - Where can I find nice Dark ReSharper (with Color identifiers = on) Themes? 如何用剃刀助手批量替换HTML(可能使用按模式进行的锐利搜索)? - How can I replace HTML with a razor helper in bulk (possibly using resharper search by pattern)? 如何使用Resharper防止源文件与构建模块时的源文件不同 - How can I prevent the source file is different from when the module was built when using Resharper Resharper(查找并)一次修复所有问题 - Resharper (Find and) fix all issues at once 如何在不使用ReSharper的情况下突出显示Visual Studio中的活动行? - How can I highlight the active line in Visual Studio, without using ReSharper? 使用Visual Studio / ReSharper跟踪TDD时,如何在正确的位置快速创建类? - How can I quickly create a class in the right place when following TDD using Visual Studio/ReSharper? 如何删除所有resharper键绑定? - How to remove all resharper keybindings?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM