Skip to content

Fix git push error for protected CLA branch #4939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 130 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
255da11
Update documentation for Run Code Analysis experience for Roslyn anal…
mavasani Nov 5, 2019
86854f4
Improve grammar and break up into smaller sentences
mavasani Nov 5, 2019
24d4719
Merge pull request #5751 from MicrosoftDocs/cxwtool-1511
ghogen Nov 6, 2019
4ae1c36
Merge branch 'master' into cxwtool-30050
cxwtool Nov 7, 2019
07b39d2
Merge pull request #5755 from MicrosoftDocs/cxwtool-30050
ghogen Nov 7, 2019
5d4303f
Apply suggestions from code review
mavasani Nov 8, 2019
e2ccf9c
Update disable-code-analysis.md
megvanhuygen Nov 8, 2019
17a4ccd
Update how-to-run-legacy-code-analysis-manually-for-managed-code.md
megvanhuygen Nov 8, 2019
080e697
Merge pull request #5742 from mavasani/RunCodeAnalysisDocUpdates
megvanhuygen Nov 8, 2019
39ebaa6
Merge branch 'master' into cxwtool-9526
cxwtool Nov 9, 2019
3ecc96d
Merge pull request #5763 from MicrosoftDocs/cxwtool-9526
ghogen Nov 9, 2019
edd5920
Add/update documentation for configuration of live code analysis scop…
mavasani Dec 2, 2019
882b3d3
Merge branch 'master' into release-16.5
ghogen Dec 2, 2019
ac61232
Fix links and some grammar improvements
mavasani Dec 2, 2019
25f64e0
Add documentation for some recent analyzer configuration features
mavasani Dec 2, 2019
f359b40
Minor tweaks
mavasani Dec 2, 2019
adf34f4
More fixes
mavasani Dec 2, 2019
c517c7d
Formatting
mavasani Dec 2, 2019
315c332
Merge branch 'master' into cxwtool-16472
cxwtool Dec 3, 2019
de98ca9
Merge pull request #5830 from MicrosoftDocs/cxwtool-16472
ghogen Dec 3, 2019
2e0baf4
Apply suggestions from code review
mavasani Dec 4, 2019
5500a85
Use bulleted list instead of numbered list
mavasani Dec 4, 2019
56e63eb
Formatting
mavasani Dec 4, 2019
ab75c1a
Add redirect for removed url
mavasani Dec 4, 2019
e2a4894
Remove the small words from the new page name
mavasani Dec 4, 2019
164bc7d
Merge remote-tracking branch 'upstream/release-16.5' into AnalysisDocs
mavasani Dec 4, 2019
bb4ac2a
Apply suggestions from code review
mavasani Dec 4, 2019
4f6bdc3
Update docs/code-quality/roslyn-analyzers-overview.md
mavasani Dec 4, 2019
5173fb3
Apply suggestions from code review
mavasani Dec 4, 2019
d61f8f1
Merge pull request #5825 from mavasani/AnalysisDocs
v-albemi Dec 4, 2019
009c10d
Use bulleted lists instead of numbered lists
mavasani Dec 4, 2019
e363d42
Merge branch 'master' into cxwtool-14782
cxwtool Dec 5, 2019
6a147bb
Address feedback
mavasani Dec 5, 2019
a90f606
Merge pull request #5828 from mavasani/BulkConfigureAnalyzers
megvanhuygen Dec 5, 2019
c5e6947
Merge pull request #5856 from MicrosoftDocs/cxwtool-14782
ghogen Dec 5, 2019
b640159
Merge branch 'master' into cxwtool-3661
cxwtool Dec 10, 2019
2c78df9
Merge pull request #5872 from MicrosoftDocs/cxwtool-3661
ghogen Dec 11, 2019
19be7a8
Merge branch 'master' into cxwtool-14827
cxwtool Dec 12, 2019
c8f2274
Merge pull request #5896 from MicrosoftDocs/cxwtool-14827
ghogen Dec 12, 2019
494c46b
Merge branch 'master' into cxwtool-31477
cxwtool Dec 14, 2019
58ba4f2
Merge branch 'master' into cxwtool-10928
cxwtool Dec 17, 2019
536b06e
Merge pull request #5913 from MicrosoftDocs/cxwtool-10928
ghogen Dec 17, 2019
13e4db1
Merge pull request #5907 from MicrosoftDocs/cxwtool-31477
ghogen Dec 17, 2019
15c470c
Merge branch 'master' into cxwtool-17735
cxwtool Dec 19, 2019
1317cd2
Merge pull request #5927 from MicrosoftDocs/cxwtool-17735
ghogen Dec 19, 2019
ba2a5c9
Merge branch 'master' into cxwtool-22253
cxwtool Dec 21, 2019
da8d39c
Merge pull request #5942 from MicrosoftDocs/cxwtool-22253
ghogen Dec 26, 2019
a1b0a55
Merge branch 'master' into cxwtool-18629
cxwtool Dec 28, 2019
21d7ba8
Merge pull request #5945 from MicrosoftDocs/cxwtool-18629
ghogen Dec 30, 2019
6d79861
Merge branch 'master' into cxwtool-15693
cxwtool Dec 31, 2019
835c507
Merge pull request #5949 from MicrosoftDocs/cxwtool-15693
ghogen Dec 31, 2019
9c1815c
Merge branch 'master' of github.com:MicrosoftDocs/visualstudio-docs-p…
ghogen Jan 7, 2020
ba7533e
Remove file
ghogen Jan 7, 2020
3f184f2
Merge pull request #5968 from ghogen/release-16.5
ghogen Jan 7, 2020
3ebabe9
New Property - ContainerDevelopmentMode
ghogen Jan 6, 2020
8318031
Merge pull request #5972 from ghogen/docker-compose-properties2
PRMerger12 Jan 8, 2020
2d82917
Merge branch 'master' into cxwtool-21887
cxwtool Jan 9, 2020
aec6e23
Merge pull request #5978 from MicrosoftDocs/cxwtool-21887
ghogen Jan 9, 2020
6c53ec0
Merge branch 'master' into cxwtool-12308
cxwtool Jan 11, 2020
9fdc59e
Merge pull request #5992 from MicrosoftDocs/cxwtool-12308
ghogen Jan 11, 2020
dbde57e
Update documentation based on feature changes
mavasani Jan 15, 2020
3e7fdf8
Merge pull request #6008 from mavasani/OptionText
megvanhuygen Jan 16, 2020
b00c06a
Merge branch 'master' of github.com:MicrosoftDocs/visualstudio-docs-p…
ghogen Jan 16, 2020
53336d9
Merge pull request #6015 from ghogen/release-16.5
ghogen Jan 16, 2020
95047dd
Merge branch 'master' into cxwtool-3232
cxwtool Jan 18, 2020
44582fc
Merge branch 'master' into cxwtool-26498
cxwtool Jan 21, 2020
300f609
Merge pull request #6023 from MicrosoftDocs/cxwtool-26498
ghogen Jan 21, 2020
f8b319a
Merge pull request #6019 from MicrosoftDocs/cxwtool-3232
ghogen Jan 21, 2020
b2100ea
Merge branch 'master' into cxwtool-16737
cxwtool Jan 23, 2020
0e76302
Merge pull request #6030 from MicrosoftDocs/cxwtool-16737
ghogen Jan 23, 2020
d071d1e
Merge branch 'master' into cxwtool-1706
cxwtool Jan 25, 2020
3574fbf
Merge pull request #6039 from MicrosoftDocs/cxwtool-1706
ghogen Jan 25, 2020
168a001
Merge branch 'master' into cxwtool-31374
cxwtool Jan 28, 2020
f12f86c
Merge pull request #6044 from MicrosoftDocs/cxwtool-31374
ghogen Jan 28, 2020
94f3ecc
Merge branch 'master' into cxwtool-14553
cxwtool Jan 30, 2020
d9d836b
Merge pull request #6052 from MicrosoftDocs/cxwtool-14553
ghogen Jan 30, 2020
a0f9673
Merge branch 'master' into cxwtool-22368
cxwtool Feb 1, 2020
674dcd4
Merge pull request #6068 from MicrosoftDocs/cxwtool-22368
ghogen Feb 1, 2020
b756333
Merge branch 'master' into cxwtool-17023
cxwtool Feb 4, 2020
40be19e
Merge pull request #6074 from MicrosoftDocs/cxwtool-17023
ghogen Feb 4, 2020
807d68e
Merge branch 'master' into cxwtool-862
cxwtool Feb 6, 2020
df5d50d
Update doc for Windows Installer
John-Hart Dec 9, 2019
36dbcf0
Merge pull request #6080 from MicrosoftDocs/cxwtool-862
ghogen Feb 7, 2020
4f67bed
Merge branch 'master' into cxwtool-25876
cxwtool Feb 8, 2020
6307248
Merge pull request #6088 from MicrosoftDocs/cxwtool-25876
ghogen Feb 10, 2020
257eea8
Merge branch 'master' into cxwtool-7866
cxwtool Feb 11, 2020
97ab37a
Merge branch 'master' into cxwtool-14531
cxwtool Feb 13, 2020
eb1caad
Merge pull request #6105 from MicrosoftDocs/cxwtool-14531
ghogen Feb 13, 2020
6c54330
Merge pull request #6093 from MicrosoftDocs/cxwtool-7866
ghogen Feb 13, 2020
773fe79
Merge branch 'master' into cxwtool-3292
cxwtool Feb 15, 2020
fa15530
Merge pull request #6124 from MicrosoftDocs/cxwtool-3292
ghogen Feb 15, 2020
eea5e22
Merge branch 'master' into cxwtool-20210
cxwtool Feb 18, 2020
db8b986
Merge pull request #6126 from MicrosoftDocs/cxwtool-20210
ghogen Feb 18, 2020
37718fd
Merge branch 'master' into cxwtool-6369
cxwtool Feb 20, 2020
8c7a0b7
Merge pull request #6141 from MicrosoftDocs/cxwtool-6369
ghogen Feb 21, 2020
e377bd1
Merge branch 'master' into cxwtool-29832
cxwtool Feb 22, 2020
de1a609
Merge pull request #6156 from MicrosoftDocs/cxwtool-29832
ghogen Feb 24, 2020
4dff28e
Merge branch 'master' into cxwtool-9809
cxwtool Feb 25, 2020
5019230
Merge pull request #6164 from MicrosoftDocs/cxwtool-9809
ghogen Feb 26, 2020
497915a
Merge branch 'master' into cxwtool-1815
cxwtool Feb 27, 2020
8717c07
Merge pull request #6177 from MicrosoftDocs/cxwtool-1815
ghogen Feb 27, 2020
954e17c
Merge branch 'master' into cxwtool-5184
cxwtool Feb 29, 2020
fa8cc7a
Merge pull request #6189 from MicrosoftDocs/cxwtool-5184
ghogen Mar 2, 2020
090e53a
Merge branch 'master' into cxwtool-22124
cxwtool Mar 3, 2020
eb137ff
Merge pull request #6198 from MicrosoftDocs/cxwtool-22124
ghogen Mar 3, 2020
c45afa2
edits
Mikejo5000 Mar 4, 2020
be9cc27
incorporated feedback
Mikejo5000 Mar 4, 2020
ca06545
Merge pull request #6209 from Mikejo5000/mikejo-updates-16.5
v-albemi Mar 4, 2020
682dcc6
Merge branch 'master' into cxwtool-25269
cxwtool Mar 5, 2020
5f7081f
Merge pull request #6211 from MicrosoftDocs/cxwtool-25269
ghogen Mar 6, 2020
c81660d
Merge branch 'master' into cxwtool-23129
cxwtool Mar 7, 2020
321239f
Merge pull request #6224 from MicrosoftDocs/cxwtool-23129
ghogen Mar 7, 2020
6b568a4
Merge branch 'master' into cxwtool-4251
cxwtool Mar 9, 2020
8bd3d45
Merge pull request #6237 from MicrosoftDocs/cxwtool-4251
ghogen Mar 9, 2020
015812c
when is task loaded issue #4816
ghogen Mar 11, 2020
1a05f25
Merge branch 'master' into cxwtool-30473
cxwtool Mar 11, 2020
4938d89
Added a document from previous-versions documents (https://docs.micro…
John-Hart Mar 13, 2020
6ca42ed
Revert "Update doc for Windows Installer"
John-Hart Mar 13, 2020
357451f
corrected link issues
John-Hart Mar 13, 2020
bf98c76
corrected errors in links
John-Hart Mar 13, 2020
0a678be
Merge branch 'master' into cxwtool-18855
cxwtool Mar 13, 2020
4a46481
Merge pull request #6259 from John-Hart/WindowsInstallerDoc
megvanhuygen Mar 14, 2020
29f04c7
update Whats New release notes link to 16.5
TerryGLee Mar 16, 2020
7e88ddf
Merge pull request #6262 from TerryGLee/tglee-whatsnew
PRMerger9 Mar 16, 2020
1a127c1
Merge pull request #6260 from MicrosoftDocs/cxwtool-18855
ghogen Mar 16, 2020
ca232ef
Merge pull request #6251 from MicrosoftDocs/cxwtool-30473
ghogen Mar 16, 2020
c3743b8
Merge pull request #6230 from MicrosoftDocs/repo_sync_working_branch
ghogen Mar 16, 2020
269abf4
Merge pull request #6249 from ghogen/msbuild-issues
PRMerger18 Mar 16, 2020
7b1229a
Merge pull request #6263 from MicrosoftDocs/release-16.5
ghogen Mar 16, 2020
92361aa
Merge pull request #6264 from MicrosoftDocs/master
ghogen Mar 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -11615,10 +11615,15 @@
"redirect_url": "/visualstudio/subscriptions",
"redirect_document_id": false
},
{
"source_path": "docs/code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md",
"redirect_url": "/visualstudio/code-quality/configure-live-code-analysis-scope-managed-code",
"redirect_document_id": true
},
{
"source_path": "docs/azure/cognitive-services-connected-services.yml",
"redirect_url": "/visualstudio/azure",
"redirect_document_id": false
}
]
}
}
17 changes: 10 additions & 7 deletions docs/code-quality/automatic-feature-suspension.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ title: Automatic feature suspension
ms.date: 11/04/2016
ms.topic: conceptual
helpviewer_keywords:
- full solution analysis
- performance
- low-memory
- "live code analysis"
- "background analysis"
- "analysis scope"
- "full solution analysis"
- "performance"
- "low-memory"
ms.assetid: 572c15aa-1fd0-468c-b6be-9fa50e170914
author: TerryGLee
ms.author: tglee
Expand All @@ -23,7 +26,7 @@ When Visual Studio detects a low memory condition, it automatically suspends cer

In a low memory condition, the following actions take place:

- Full solution analysis for Visual C# and Visual Basic is disabled.
- Live code analysis for Visual C# and Visual Basic is reduced to minimal scope.

- [Garbage Collection](/dotnet/standard/garbage-collection/index) (GC) low-latency mode for Visual C# and Visual Basic is disabled.

Expand All @@ -33,9 +36,9 @@ In a low memory condition, the following actions take place:

For tips and tricks on how to improve Visual Studio performance when dealing with large solutions or low-memory conditions, see [Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions).

## Full solution analysis suspended
## Live code analysis is reduced to minimal scope

By default, full solution analysis is enabled for Visual Basic and disabled for Visual C#. However, in a low memory condition, full solution analysis is automatically disabled for both Visual Basic and Visual C#, regardless of their settings in the Options dialog box. However, you can re-enable full solution analysis by choosing the **Re-enable** button in the info bar when it appears, by selecting the **Enable full solution analysis** check box in the Options dialog, or by restarting Visual Studio. The Options dialog box always shows the current full solution analysis settings. For more information, see [How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md).
By default, live code analysis executes for open documents and projects. You can customize this analysis scope to be reduced to current document or increased to entire solution. For more information, see [How to: Configure live code analysis scope for managed code](./configure-live-code-analysis-scope-managed-code.md). In a low memory condition, Visual Studio forces the live analysis scope to be reduced to current document. However, you can re-enable your preferred analysis scope by choosing the **Re-enable** button in the info bar when it appears or by restarting Visual Studio. The Options dialog box always shows the current live code analysis scope settings.

## GC low-latency disabled

Expand All @@ -58,6 +61,6 @@ In addition, caches used for internal Visual Studio operations are also cleared.

## See also

- [How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md)
- [How to: Configure live code analysis scope for managed code](./configure-live-code-analysis-scope-managed-code.md)
- [Fundamentals of Garbage Collection](/dotnet/standard/garbage-collection/fundamentals)
- [Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: "Configure live code analysis scope for managed code"
ms.date: 03/23/2018
ms.topic: "conceptual"
helpviewer_keywords:
- "live code analysis"
- "background analysis"
- "analysis scope"
- "full solution analysis"
author: jillre
ms.author: jillfra
manager: jillfra
ms.workload:
- "dotnet"
---
# How to: Configure live code analysis scope for managed code

## What is "Live code analysis" for managed code?
Visual Studio executes a bunch of live code analyses, also referred to as *background analysis*, while you are editing source files in the editor. Some of it is required minimal analysis for an acceptable Visual Studio IDE editing experience. Some of it is for improved responsiveness for IDE features. While some of it is to enable additional IDE functionality, such as diagnostics and code fixes from Roslyn analyzers. Based on the functionality, these analyses can be grouped as follows:

- **Background computation of diagnostics**: Analysis to compute errors, warnings, and suggestions in source files. These diagnostics show up as entries in the error list and as squiggles in the editor. They can be classified into two categories:
- C# and Visual Basic compiler diagnostics
- Roslyn analyzer diagnostics, which includes:

- Built-in IDE analyzers for code style suggestions and
- Third party analyzer packages [installed](./install-roslyn-analyzers.md) for projects in the current solution.

- **Other background analyses**: Analysis to improve the responsiveness and Visual Studio interaction for IDE features. Some examples of such analyses are:
- Background parsing of open files.
- Background compilation of projects with open files to realize symbols for improved responsiveness of certain IDE features.
- Building syntax and symbol caches.
- Detecting designer association for source files, such as forms, controls, etc.

## Default analysis scope

By default, live code analysis for background computation of diagnostics executes for all the files that are _opened_ in Visual Studio. Few of the _other background analyses_ mentioned above execute for all the projects, which have at least one open file. While few background analyses execute for the entire solution.

## Custom analysis scope

The default scope of each background analysis has been tuned for the optimal user experience, functionality, and performance for majority of customer scenarios and solutions. However, there are cases where customers may want to customize this scope to decrease or increase the background analysis. For example:

- Power save mode: If users are running on laptop battery, they may want to minimize the power consumption for longer battery life. In this scenario, they would want to minimize background analysis.
- On-demand code analysis: If users prefer turning off live analyzer execution and manually running code analysis on-demand, they would want to minimize background analysis. See [How to: Manually run code analysis on-demand](./how-to-run-code-analysis-manually-for-managed-code.md).
- Full solution analysis: If users want to always see all diagnostics in all files in the solution, regardless of whether they are open in the editor or not. In this scenario, they would want to maximize background analysis scope to entire solution.

Starting in Visual Studio 2019 version 16.5, users can explicitly customize the scope of all live code analysis, including diagnostics computation, for C# and Visual Basic projects. Available analysis scopes are:

- **Current document**: Minimizes the live code analysis scope to only execute for the current or visible file in the editor.
- **Open documents**: Default live code analysis scope, as described in the above section.
- **Entire solution**: Maximizes the live code analysis scope to execute for all files and projects in the entire solution.

You can choose one of the above custom analysis scopes in Tools Options dialog by following the below steps:

1. To open the **Options** dialog box, on the menu bar in Visual Studio choose **Tools** > **Options**.

2. In the **Options** dialog box, choose **Text Editor** > **C#** or **Basic** > **Advanced**.

3. Select the desired **Background analysis scope** to customize the analysis scope. Choose **OK** when you're done.

![Analysis scope.](./media/background-analysis-scope.png)

> [!NOTE]
> Prior to Visual Studio 2019 version 16.5, users can customize the analysis scope for diagnostics computation to entire solution using the **Enable full solution analysis** check box from **Tools** > **Options** > **Text Editor** > **C#** or **Basic** > **Advanced** tab. There is no support to minimize the background analysis scope in prior Visual Studio versions.

## Automatically minimize live code analysis scope

If Visual Studio detects that 200 MB or less of system memory is available to it, it automatically minimizes the live code analysis scope to "Current Document". If this occurs, an alert appears informing you that Visual Studio has disabled some features. A button lets you switch back to the prior analysis scope if you want.

![Alert text minimizing analysis scope](./media/fsa_alert.png)

## See also

- [Automatic feature suspension](./automatic-feature-suspension.md)
- [Power save mode feature request](https://github.com/dotnet/roslyn/issues/38429)
18 changes: 7 additions & 11 deletions docs/code-quality/disable-code-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ This page helps you disable code analysis in Visual Studio. There are limitation

.NET Core and .NET Standard projects have options on their Code Analysis properties page that let you turn off code analysis from analyzers installed as a NuGet package. For more information, see [.NET Core and .NET Standard projects](#net-core-and-net-standard-projects). To turn off source code analysis for .NET Framework projects, see [.NET Framework projects](#net-framework-projects).

- NuGet analyzer package versus VSIX or built-in analyzers

Currently, you cannot disable live code analysis for the built-in analyzers, for example, rule ID IDE0067. Similarly, you cannot disable live code analysis for analyzers that were installed as part of a Visual Studio extension (VSIX). To suppress errors and warnings from built-in and VSIX-based analyzers, choose **Analyze** > **Build and Suppress Active Issues** on the menu bar. You *can* disable live and built-time analysis for analyzers installed as part of a NuGet package.

- Source analysis versus legacy analysis

This topic applies to source code analysis and not to legacy (binary) analysis. For information about disabling legacy analysis, see [How to: Enable and disable legacy code analysis](how-to-enable-and-disable-automatic-code-analysis-for-managed-code.md).

## .NET Core and .NET Standard projects

Starting in Visual Studio 2019 version 16.3, there are two checkboxes available in the Code Analysis properties page that let you control whether NuGet-based analyzers run at build time and design time. These options are project specific.
Starting in Visual Studio 2019 version 16.3, there are two checkboxes available in the Code Analysis properties page that let you control whether analyzers run at build time and design time. These options are project-specific.

![Enable or disable live code analysis or on build in Visual Studio](media/run-on-build-run-live-analysis.png)

Expand All @@ -39,17 +35,17 @@ To open this page, right-click on the project node in **Solution Explorer** and
- To disable live source analysis, uncheck the **Run on live analysis** option.

> [!NOTE]
> Built-in and VSIX-based analyzers will continue to provide live analysis of your code, even if **Run on live analysis** is unchecked. If you want to suppress errors and warnings from these analyzers, choose **Analyze** > **Build and Suppress Active Issues** on the menu bar.
> Starting in Visual Studio 2019 version 16.5, if you prefer the on-demand code analysis execution workflow, you can disable analyzer execution during live analysis and/or build and manually trigger code analysis once on a project or a solution on demand. For information about running code analysis manually, see [How to: Run Code Analysis Manually for Managed Code](how-to-run-code-analysis-manually-for-managed-code.md).

## .NET Framework projects

To turn off source code analysis for analyzers installed as part of a NuGet package, add one or more of the following MSBuild properties to the [project file](../ide/solutions-and-projects-in-visual-studio.md#project-file).
To turn off source code analysis for analyzers, add one or more of the following MSBuild properties to the [project file](../ide/solutions-and-projects-in-visual-studio.md#project-file).

| MSBuild property | Description | Default |
| - | - | - |
| `RunAnalyzersDuringBuild` | Controls whether NuGet-based analyzers run at build time. | `true` |
| `RunAnalyzersDuringLiveAnalysis` | Controls whether NuGet-based analyzers analyze code live at design time. | `true` |
| `RunAnalyzers` | Disables NuGet-based analyzers at both build and design time. This property takes precedence over `RunAnalyzersDuringBuild` and `RunAnalyzersDuringLiveAnalysis`. | `true` |
| `RunAnalyzersDuringBuild` | Controls whether analyzers run at build time. | `true` |
| `RunAnalyzersDuringLiveAnalysis` | Controls whether analyzers analyze code live at design time. | `true` |
| `RunAnalyzers` | Disables analyzers at both build and design time. This property takes precedence over `RunAnalyzersDuringBuild` and `RunAnalyzersDuringLiveAnalysis`. | `true` |

Examples:

Expand All @@ -67,7 +63,7 @@ Examples:

You cannot turn off [source analysis](roslyn-analyzers-overview.md) in Visual Studio 2017. If you want to clear analyzer errors from the Error List, you can suppress all the current violations by choosing **Analyze** > **Run Code Analysis and Suppress Active Issues** on the menu bar. For more information, see [Suppress violations](use-roslyn-analyzers.md#suppress-violations).

Starting in Visual Studio 2019 version 16.3, you can turn off NuGet-based source code analysis. Consider upgrading to Visual Studio 2019.
Starting in Visual Studio 2019 version 16.3, you can turn off source code analysis or execute it on demand. Consider upgrading to Visual Studio 2019.

## Legacy analysis

Expand Down
4 changes: 2 additions & 2 deletions docs/code-quality/fxcop-analyzers-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ FxCop analyzers are based on the .NET Compiler Platform ("Roslyn"). You [install

## Does the Run Code Analysis command run FxCop analyzers?

No. When you select **Analyze** > **Run Code Analysis**, it executes legacy analysis. **Run Code Analysis** has no effect on Roslyn-based analyzers, including the Roslyn-based FxCop analyzers.
Prior to Visual Studio 2019 16.5 release, when you select **Analyze** > **Run Code Analysis**, it executes legacy analysis. Starting Visual Studio 2019 16.5, **Run Code Analysis** menu option executes Roslyn-based analyzers for the selected project or solution. If you have installed Roslyn-based FxCop analyzers, they would also be executed. For more information, see [How to: Run Code Analysis Manually for Managed Code](how-to-run-code-analysis-manually-for-managed-code.md).

## Does the RunCodeAnalysis msbuild project property run analyzers?

No. The **RunCodeAnalysis** property in a project file (for example, *.csproj*) is only used to execute legacy FxCop. It runs a post-build msbuild task that invokes **FxCopCmd.exe**. This is equivalent to selecting **Analyze** > **Run Code Analysis** in Visual Studio.
No. The **RunCodeAnalysis** property in a project file (for example, *.csproj*) is only used to execute legacy FxCop. It runs a post-build msbuild task that invokes **FxCopCmd.exe**.

## So how do I run FxCop analyzers then?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In Visual Studio, you can choose from a list of code analysis [rule sets](../cod

::: moniker range=">=vs-2019"

3. To run code analysis every time the project is built using the selected configuration, select **Run on build** in the **Binary analyzers** section. You can also run code analysis manually by selecting **Analyze** > **Run Code Analysis** > **Run Code Analysis on \<projectname>**.
3. To run code analysis every time the project is built using the selected configuration, select **Run on build** in the **Binary analyzers** section. You can also run legacy code analysis manually, see [How to: Run Legacy Code Analysis Manually for Managed Code](how-to-run-legacy-code-analysis-manually-for-managed-code.md) for more details.

::: moniker-end

Expand Down

This file was deleted.

Loading