You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/analyzers-faq.yml
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
### YamlMime:FAQ
2
2
metadata:
3
3
title: EditorConfig versus analyzers
4
-
ms.date: 10/05/2021
4
+
ms.date: 08/15/2025
5
5
description: Learn about .NET Compiler Platform-based code analysis in Visual Studio. See answers to questions about EditorConfig files, rule sets, and other topics.
6
6
ms.topic: faq
7
7
helpviewer_keywords:
@@ -30,23 +30,25 @@ sections:
30
30
answer: |
31
31
Rule sets and EditorConfig files can coexist and can both be used to configure analyzers. Both EditorConfig files and rule sets let you enable and disable rules and set their severity.
32
32
33
-
However, EditorConfig files offer additional ways to configure rules too:
33
+
However, in Visual Studio 2019 version 16.5 and later, rule set files are deprecated in favor of EditorConfig files, and .NET Core and .NET 5+ projects don't support all the rule set menu commands. For more information, see [Convert an existing rule set file to an EditorConfig file](../code-quality/use-roslyn-analyzers.md#convert-an-existing-rule-set-file-to-an-editorconfig-file).
34
+
35
+
EditorConfig files offer additional ways to configure rules:
34
36
35
37
- For the .NET code-quality analyzers, EditorConfig files let you [define which types of code to analyze](/dotnet/fundamentals/code-analysis/code-quality-rule-options).
36
-
- For the .NET code-style analyzers that are built into Visual Studio, EditorConfig files let you [define the preferred code styles](/dotnet/fundamentals/code-analysis/code-style-rule-options) for a codebase.
38
+
- For the .NET code-style analyzers and .NET code-quality analyzers, EditorConfig files let you [define the preferred code styles](/dotnet/fundamentals/code-analysis/code-style-rule-options) for a codebase.
37
39
38
40
In addition to rule sets and EditorConfig files, some analyzers are configured through the use of text files marked as [additional files](../ide/build-actions.md#build-action-values) for the C# and VB compilers.
39
41
40
42
> [!NOTE]
41
43
> - EditorConfig files can only be used to enable rules and set their severity in Visual Studio 2019 version 16.3 and later.
42
-
> - EditorConfig files cannot be used to configure legacy analysis, whereas rule sets can.
44
+
> - EditorConfig files can't be used to configure legacy analysis, whereas rule sets can.
43
45
44
46
- name: Code analysis in continuous integration (CI) builds
45
47
questions:
46
48
- question: |
47
49
Does .NET Compiler Platform-based code analysis work in continuous integration (CI) builds?
48
50
answer: |
49
-
Yes. For analyzers that are installed from a NuGet package, those rules are [enforced at build time](roslyn-analyzers-overview.md#build-errors), including during a CI build. Analyzers used in CI builds respect rule configuration from both rule sets and EditorConfig files. Currently, the code analyzers that are built into Visual Studio are not available as a NuGet package, and so these rules are not enforceable in a CI build.
51
+
Yes. For analyzers that are installed with .NET SDK 5.0 or higher, or from a NuGet package, those rules are [enforced at build time](roslyn-analyzers-overview.md#build-errors), including during a CI build. Analyzers used in CI builds respect rule configuration from both rule sets and EditorConfig files. Starting with .NET 5.0, the code style analyzers that are built into Visual Studio are also included in the .NET SDK, and most of them are enforceable in a CI build. For more information, see [Enable on build](/dotnet/fundamentals/code-analysis/overview?tabs=net-9#enable-on-build).
50
52
51
53
- name: IDE analyzers versus StyleCop
52
54
questions:
@@ -69,7 +71,7 @@ sections:
69
71
- question: |
70
72
What's the difference between FxCop analyzers and .NET analyzers?
71
73
answer: |
72
-
Both FxCop analyzers and .NET analyzers refers to the .NET Compiler Platform ("Roslyn") analyzer implementations of FxCop CA rules. Prior to Visual Studio 2019 16.8 and .NET 5.0, these analyzers shipped as `Microsoft.CodeAnalysis.FxCopAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers). Starting in Visual Studio 2019 16.8 and .NET 5.0, these analyzers are [included with the .NET SDK](/dotnet/fundamentals/code-analysis/overview). They are also available as `Microsoft.CodeAnalysis.NetAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers). Please consider [migrating from FxCop analyzers to .NET analyzers](migrate-from-fxcop-analyzers-to-net-analyzers.md).
74
+
Both FxCop analyzers and .NET analyzers refers to the .NET Compiler Platform ("Roslyn") analyzer implementations of FxCop CA rules. Prior to Visual Studio 2019 16.8 and .NET 5.0, these analyzers shipped as `Microsoft.CodeAnalysis.FxCopAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers). Starting in Visual Studio 2019 16.8 and .NET 5.0, these analyzers are [included with the .NET SDK](/dotnet/fundamentals/code-analysis/overview). They're also available as `Microsoft.CodeAnalysis.NetAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers). Please consider [migrating from FxCop analyzers to .NET analyzers](migrate-from-fxcop-analyzers-to-net-analyzers.md).
Copy file name to clipboardExpand all lines: docs/code-quality/in-source-suppression-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ The properties of the attribute include:
194
194
195
195
-[`module`](#module-suppression-scope): This scope suppresses warnings against an assembly. It's a global suppression that applies to the entire project.
196
196
197
-
-`resource`: ([Legacy FxCop](../code-quality/static-code-analysis-for-managed-code-overview.md) only) This scope suppresses warnings in diagnostic info written to resource files that are part of the module (assembly). This scope isn't read or respected in C#/VB compilers for Roslyn analyzer diagnostics, which only analyze source files.
197
+
-`resource`: ([legacy analysis](../code-quality/static-code-analysis-for-managed-code-overview.md) only) This scope suppresses warnings in diagnostic info written to resource files that are part of the module (assembly). This scope isn't read or respected in C#/VB compilers for Roslyn analyzer diagnostics, which only analyze source files.
198
198
199
199
-`type`: This scope suppresses warnings against a type.
200
200
@@ -222,7 +222,7 @@ If there are strict performance reasons for minimizing in-source suppression met
222
222
223
223
For maintainability reasons, omitting the rule name isn't recommended.
224
224
225
-
### Suppress selective violations within a method body
225
+
### Suppress selective violations within a method body (legacy analysis only)
226
226
227
227
Suppression attributes can be applied to a method, but can't be embedded within a method body. All violations of a particular rule are suppressed if you add the <xref:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute> attribute to the method.
Copy file name to clipboardExpand all lines: docs/code-quality/roslyn-analyzers-overview.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Visual Studio includes a core set of Roslyn analyzers, which are always active.
73
73
74
74
### Scope
75
75
76
-
If you install an analyzer as a NuGet package, the preferred method, it applies only to the project where the NuGet package is installed. Otherwise, if you install an analyzer as a Visual Studio extension, it applies at the solution level and to all instances of Visual Studio. In team environments, an analyzer you install as a NuGet package is in scope for all developers that work on that project.
76
+
If you install an analyzer as a NuGet package, the preferred method for external analyzers, it applies only to the project where the NuGet package is installed. Otherwise, if you install an analyzer as a Visual Studio extension, it applies at the solution level and to all instances of Visual Studio. In team environments, an analyzer you install as a NuGet package is in scope for all developers that work on that project.
77
77
78
78
> [!NOTE]
79
79
> First-party analyzers ship within the .NET SDK. It's preferable that you enable these analyzers from the .NET SDK instead of installing them as a `Microsoft.CodeAnalysis.NetAnalyzers`[NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers). Enabling the analyzers from the .NET SDK ensures that you automatically get analyzer bug fixes and new analyzers as soon as you update the SDK. For more information about analyzers, see [Enable or install first-party .NET analyzers](install-net-analyzers.md).
@@ -92,7 +92,7 @@ The following screenshot shows the command-line build output from building a pro
92
92
93
93
### Rule severity
94
94
95
-
If you want to configure [analyzer rule severity](../code-quality/use-roslyn-analyzers.md#configure-severity-levels), you must install the analyzer as a NuGet package. You can't configure rule severity from analyzers that were installed as a Visual Studio extension.
95
+
If you want to configure [analyzer rule severity](../code-quality/use-roslyn-analyzers.md#configure-severity-levels) for external analyzers, you must install the analyzer as a NuGet package. You can't configure rule severity from analyzers that were installed as a Visual Studio extension.

42
+
::: moniker-end
43
+
::: moniker range="vs-2019"
44
+

45
+
::: moniker-end
41
46
42
-
1. The **Remove Unused References** dialog will open displaying references that have no usage in source code. Unused references will be pre-selected for removal with an option to preserve references by selecting `Keep` from the Action drop down.
47
+
1. The **Remove Unused References** dialog opens, displaying references that have no usage in source code. Unused references are pre-selected for removal with an option to preserve references by selecting `Keep` from the Action drop down.
Copy file name to clipboardExpand all lines: docs/xaml-tools/xaml-overview.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Use the XAML code editor and XAML Designer tools
3
3
description: Get basic information about the Extensible Application Markup Language (XAML) and how to work with the XAML code editor and XAML Designer tools in Visual Studio.
4
-
ms.date: 06/23/2020
4
+
ms.date: 08/15/2025
5
5
ms.topic: overview
6
6
author: maddymontaquila
7
7
ms.author: maleger
@@ -13,9 +13,10 @@ ms.subservice: xaml-tools
13
13
Extensible Application Markup Language (XAML) is a declarative language that's based on XML. XAML is used extensively in the following types of applications to build user interfaces:
14
14
15
15
-[Windows Presentation Foundation (WPF) apps](/dotnet/framework/wpf/advanced/xaml-in-wpf)
16
-
-[Universal Windows Platform (UWP) apps](/windows/uwp/xaml-platform/xaml-overview)
0 commit comments