Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
424 views
in Technique[技术] by (71.8m points)

c# - How to turn off graying out unused usings?

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.

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).

enter image description here


enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...