How do you completely disable the light bulb in Visual Studio 2015? It reminds me of Clippy.
-
3See here http://stackoverflow.com/questions/31541091/customise-light-bulb-quick-action-rules – Rahul Jul 22 '15 at 21:06
-
1I think it's the same as in VS2013 - you disable CodeLens. Here's a VS2013 answer; maybe it will work in 2015.http://stackoverflow.com/questions/20457796/how-to-turn-off-codelens-references – Matthew Watson Jul 24 '15 at 14:00
3 Answers
The light bulb seems to be driven of an Analyzer. these can be manipulated via a Code Analysis Ruleset.
In project properties select the Code Analysis tab -
Then open and edit a Ruleset, these are under the Analyzers Microsoft.CodeAnalysis.CSharp.Features
, Microsoft.CodeAnalysis.CSharp
and Mirosoft.Analyzers.NativeCodeAnalysis
:
Managed Binary Analysis seems to be FxCop / Code Analysis which was in previous versions.
Change the rules to none, and the rules aren't fired anymore. Adding or using different Analyzers will result in the return of the light bulb however.
The created Ruleset can be applied to all projects as needed.
However, the light bulb is the replacement for the tool tip, so disabling everything would severly hamper the usefulness of Visual Studio as an IDE.

- 18,469
- 14
- 77
- 117
-
3Thank you. The "remove unnecessary usings" light bulb was the one that was really driving me nuts and this let me turn that rule off specifically. – BowserKingKoopa Jul 24 '15 at 15:51
-
I had to open original file ("C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset") and edit it manually to avoid copies of rules. So it is the way to have it by default... but I still need a way to store solution-wide rules (outside of any project). – Maxim May 13 '16 at 09:31
-
@Maxim I'm in a similar situation. Shouldn't most of the rules that code analysis enforces be something that the whole company should agree on? It would be useful to at least have the option to save these settings in the solution. Situations where you want one dll to use one convention, and another dll to use a different convention in the same solution seem like they would be rather rare (e.g., if you include a fork of a third party open source library in your application's solution). – jrh Aug 08 '17 at 14:49
-
@jrh With VS2017 where they switched back to csproj (updated) I just disabled not necessary warnings in project settings. So it is not a question any more for me... In some very specific per-file case I can disable it using #pragma warning disable. I do not believe in per company rule-set.. I believe in per-project rule-set (not solution... but project). – Maxim Aug 08 '17 at 20:32
I just found this extension:
https://marketplace.visualstudio.com/items?itemName=MussiKara.HideSuggestionAndOutliningMargins
The extension removes the huge left gap between the window start and the code, wiping out the light bulb. It's clear new VS are designed for 16:9 monitors and not for the good ones a.k.a. 5:4 ;)
The bad point is that removes EVERYTHING on that left gap, and this includes code folding. Good point is that the fold keybinding (Ctrl+M,Ctrl+M in my VS) still works.
If you hate the light bulb as much as I do it pays off at least until VS2022, where microsoft will decide to add an option to remove it and reintroduce Class Wizard for the fourth time.
EDIT: I found that https://marketplace.visualstudio.com/items?itemName=vs-publisher-403103.HideLightbulbMargin behaves better. It only disables light bulb but keeps the code folding.

- 296
- 1
- 14
To completely disable the light bulb :
For Visual Studio 2015, you can add this key in the registry :
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Roslyn\Internal\OnOff\Features] "Squiggles"=dword:00000000
For Visual Studio 2017, you can add this key in the registry :
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_xxxxxxxx\Roslyn\Internal\OnOff\Features] "Squiggles"=dword:00000000
with "xxxxxxxx" being a random string.

- 1,888
- 1
- 16
- 27