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.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,13 @@ In addition to rule sets and EditorConfig files, some analyzers are configured t
57
57
58
58
**Q**: What's the difference between legacy analysis and .NET Compiler Platform-based code analysis?
59
59
60
-
**A**: .NET Compiler Platform-based code analysis analyzes source code in real time and during compilation, whereas legacy analysis analyzes binary files after build has completed. For more information, see [.NET Compiler Platform-based analysis versus legacy analysis](../code-quality/fxcop-analyzers-faq.md#whats-the-difference-between-legacy-fxcop-and-fxcop-analyzers).
60
+
**A**: .NET Compiler Platform-based code analysis analyzes source code in real time and during compilation, whereas legacy analysis analyzes binary files after build has completed. For more information, see [.NET Compiler Platform-based analysis versus legacy analysis](../code-quality/net-analyzers-faq.md#whats-the-difference-between-legacy-fxcop-and-net-analyzers).
61
+
62
+
## FxCop analyzers versus .NET analyzers
63
+
64
+
**Q**: What's the difference between FxCop analyzers and .NET analyzers?
65
+
66
+
**A**: 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).
61
67
62
68
## Treat warnings as errors
63
69
@@ -75,12 +81,12 @@ In addition to rule sets and EditorConfig files, some analyzers are configured t
75
81
</Project>
76
82
```
77
83
78
-
2. Add a line to your .csproj or .vbproj project file to import the .props file you created in the previous step. This line must be placed before any lines that import the FxCop analyzer .props files. For example, if your .props file is named codeanalysis.props:
84
+
2. Add a line to your .csproj or .vbproj project file to import the .props file you created in the previous step. This line must be placed before any lines that import the analyzer .props files. For example, if your .props file is named codeanalysis.props:
Copy file name to clipboardExpand all lines: docs/code-quality/fxcop-rule-port-status.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: FxCop rule port status
3
3
ms.date: 05/21/2019
4
-
description: Learn about the static code analysis rules that have been ported to FxCop analyzers in Visual Studio. View ported rules and resources on porting updates.
4
+
description: Learn about the static code analysis rules that have been ported to .NET analyzers in Visual Studio. View ported rules and resources on porting updates.
5
5
ms.custom: SEO-VS-2020
6
6
ms.topic: reference
7
7
helpviewer_keywords:
8
8
- fxcop rules
9
-
- fxcop analyzers, ported rules
9
+
- .NET analyzers, ported rules
10
10
author: mikejo5000
11
11
ms.author: mikejo
12
12
manager: jillfra
@@ -15,13 +15,13 @@ ms.workload:
15
15
---
16
16
# Fxcop rule port status
17
17
18
-
If you previously used static code analysis in Visual Studio, you may be wondering which of those rules are available in the current implementation as [FxCop analyzers](install-fxcop-analyzers.md). This page lists the rules that have been ported. See [Unported rules](fxcop-unported-rules.md) for those that haven't been ported and whether there are plans to port them.
18
+
If you previously used static code analysis in Visual Studio, you may be wondering which of those rules are available in the current implementation as [.NET analyzers](install-net-analyzers.md). This page lists the rules that have been ported. See [Unported rules](fxcop-unported-rules.md) for those that haven't been ported and whether there are plans to port them.
19
19
20
20
## Ported rules
21
21
22
-
The [autogenerated documentation page](https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md) in the roslyn-analyzers repo has the most up-to-date list of rules that have been ported to FxCop analyzers. That page also has additional information, such as whether the rule is enabled by default and if it has an associated *code fix*. ([Code fixes](../ide/quick-actions.md) are one-click fixes available in the light bulb icon menu in Visual Studio.)
22
+
The [autogenerated documentation page](https://github.com/dotnet/roslyn-analyzers/blob/master/src/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.md) in the roslyn-analyzers repo has the most up-to-date list of rules that have been ported to Roslyn analyzers. That page also has additional information, such as whether the rule is enabled by default and if it has an associated *code fix*. ([Code fixes](../ide/quick-actions.md) are one-click fixes available in the light bulb icon menu in Visual Studio.)
23
23
24
-
As of the date on this page, the list of FxCop rules that have been ported to [FxCop analyzers](install-fxcop-analyzers.md) includes:
24
+
As of the date on this page, the list of FxCop rules that have been ported to [.NET analyzers](install-net-analyzers.md) includes:
25
25
26
26
Rule ID | Title
27
27
--------|---------
@@ -58,7 +58,7 @@ Rule ID | Title
58
58
[CA1050](/dotnet/fundamentals/code-analysis/quality-rules/ca1050) | Declare types in namespaces
59
59
[CA1051](/dotnet/fundamentals/code-analysis/quality-rules/ca1051) | Do not declare visible instance fields
60
60
[CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) | Static holder types should be static or NotInheritable
61
-
[CA1053](/dotnet/fundamentals/code-analysis/quality-rules/ca1053) | Static holder types should not have constructors (CA1053 is part of [CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) for FxCop analyzers)
61
+
[CA1053](/dotnet/fundamentals/code-analysis/quality-rules/ca1053) | Static holder types should not have constructors (CA1053 is part of [CA1052](/dotnet/fundamentals/code-analysis/quality-rules/ca1052) for .NET analyzers)
62
62
[CA1054](/dotnet/fundamentals/code-analysis/quality-rules/ca1054) | Uri parameters should not be strings
63
63
[CA1055](/dotnet/fundamentals/code-analysis/quality-rules/ca1055) | Uri return values should not be strings
64
64
[CA1056](/dotnet/fundamentals/code-analysis/quality-rules/ca1056) | Uri properties should not be strings
@@ -198,4 +198,4 @@ CA9999 | Analyzer version mismatch
0 commit comments