Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
415 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...