如何关闭灰显未使用的功能? [英] How to turn off graying out unused usings?

查看:117
本文介绍了如何关闭灰显未使用的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何(假设甚至有可能)关闭Visual Studio 2015功能以将未使用的用法(在C#中使用,在VB中使用Imports)显示为灰色?我喜欢VS中所有其他突出显示/语法检查/自动编译的东西,我只是想专门关闭此功能,以使未使用的用法变灰.

How (supposing it's even possible) to turn off the Visual Studio 2015 feature to gray out unused usings (usings in C#, Imports in VB) ?? I like all the other highlight / syntax checking / auto compile stuff in VS, I'm only trying to turn this off specifically to graying out unused usings.

我似乎在VS 2015菜单中找不到专门的选项.如果有人知道这种选择,请告知位置.

I can't seem to find an option for this specifically in the VS 2015 menus. If anybody is aware of such an option please advise as to location.

推荐答案

您可以逐个项目禁用它.打开项目参考>分析器,然后关闭IDE0005.这将禁用视觉提示"(显示为灰色的提示),但是如果将光标放在其中之一上,您仍然可以选择快速操作删除不必要的用途".不要以为有可能禁用此功能(而且您也绝对不应该如此).

You can disable it on a project-by-project basis. Open your project references > Analyzers and turn off IDE0005. This will disable the 'visual cue' (grayed out hint) but you will still be able to select the quick action 'Remove unnecessary usings' if you put the cursor on one of these. Don't think it's possible to disable this (and you really shouldn't anyway).

这篇关于如何关闭灰显未使用的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆