How can I disable live code analysis in Visual Studio 2017?

前端 未结 4 1182
北恋
北恋 2021-02-07 01:01

Where can I disable live code analysis in Visual Studio 2017? This pops up every time I start my solution. I do not need this:

I\'ve followed this supp

相关标签:
4条回答
  • 2021-02-07 01:28

    I was able to make VS 2019 run at acceptable speeds using the 'Auto cancel long running auxiliary operations on typing' setting. The default 'Automatic' setting appeared ineffective, although changing it back now doesn't seen to re-introduce the very slow background processing issue.

    I have no idea if this stops/aborts/prevents more useful features, although it seems to "tame" VS 2019's background processing.

    0 讨论(0)
  • 2021-02-07 01:31

    It's not possible In VS2017

    only if all Roslyn installed components in Extensions and Updates are disabled.

    I'm using a workaround, global setting forces analyses runs at build on solution projects, in editor runs at any change but now editor is a lot faster with bellow workaround:

    Tools -> Options -> Text Editor -> C# (in my case) -> Advanced -> Perform editor feature analysis in external process (experimental) -> select it and save.

    UPDATE: It's possible in VS2019 16.5

    More details on closed issue (solution is for VS2019):How to disable live code compilation/analysis in Visual Studio 2017?

    0 讨论(0)
  • 2021-02-07 01:40

    I had a similar problem. There is this huge temp initialization file in the project, 50K+ lines. Whenever I opened it, Live code analysis would kick in and VS would eat up CPU up to 50%. I was able to turn it off by creating an empty rule set and set it on Code Analysis section of the project's properties. Now It looks like it's running, only for a few seconds and then it stops since there is no rule to apply.

    I don't know if this exactly applies to your problem but here how it goes.

    To create an empty rule set;

    • Click "Choose multiple rule sets" from the ComboBox under "Run this ruleset" :

    • Make sure no rule set is checked in the "Add or Remove Ruleset" window.

    • Click "Save As" button:
    • In file dialog, save your new rule set. I named mine as "EmptyRuleSet".
    • After saving process, new empty rule set should be selected in the ComboBox. Click the "Open" button below :
    • In rule set details, uncheck all the sub rule sets and there is only "None" under "Action" column:
    • Save the changes on project properties. After these steps, you can see that "Live Code Analysis" run empty for a few seconds when you open a file or start the solution, then it stops. You may have to restart the VisualStudio.

    0 讨论(0)
  • 2021-02-07 01:45

    Try to disable analyzers in solution explorer as described here: How do I disable all Roslyn Code Analyzers? and reload the solution

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