How do you disable the light bulb in Visual Studio 2015?

前端 未结 3 1891
-上瘾入骨i
-上瘾入骨i 2020-12-05 23:13

How do you completely disable the light bulb in Visual Studio 2015? It reminds me of Clippy.

相关标签:
3条回答
  • 2020-12-05 23:28

    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.

    0 讨论(0)
  • 2020-12-05 23:30

    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.

    0 讨论(0)
  • 2020-12-05 23:31

    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.

    0 讨论(0)
提交回复
热议问题