Skip to content

Commit 68e4138

Browse files
Merge pull request #13820 from Mikejo5000/mikejo-br26
Update code analysis articles
2 parents 66d72c9 + 85c5976 commit 68e4138

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/code-quality/code-metrics-values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How code metrics help identify risks
3-
ms.date: 11/29/2023
3+
ms.date: 04/14/2025
44
description: Learn about cyclomatic complexity, class coupling, and other Visual Studio code metrics. See how metrics can track development progress and identify risks.
55
ms.topic: conceptual
66
f1_keywords:

docs/code-quality/how-to-generate-code-metrics-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Generate code metrics from the IDE or command line
3-
ms.date: 11/02/2018
3+
ms.date: 04/14/2025
44
description: Learn how to generate code metrics data in Visual Studio. See how to use Solution Explorer, a rule set file, the command line, or a menu command.
55
ms.topic: how-to
66
helpviewer_keywords:

docs/code-quality/install-net-analyzers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Enable or install first-party .NET analyzers
3-
ms.date: 09/14/2023
3+
ms.date: 04/14/2025
44
description: Enable first-party .NET analyzers by using the .NET SDK in Visual Studio or install a first-party analyzer as a NuGet package.
55
ms.topic: how-to
66
helpviewer_keywords:
@@ -13,13 +13,13 @@ ms.subservice: code-analysis
1313

1414
# Enable or install first-party .NET analyzers
1515

16-
.NET compiler platform (Roslyn) analyzers inspect your C# or Visual Basic code for code quality and code style issues. The first-party .NET analyzers are **target-platform agnostic**. That is, your project doesn't need to target a specific .NET platform. The analyzers work for projects that target `net5.0` and earlier .NET versions, such as `netcoreapp`, `netstandard`, and `net472`.
16+
.NET compiler platform (Roslyn) analyzers inspect your C# or Visual Basic code for code quality and code style issues. The first-party .NET analyzers are **target-platform agnostic**. That is, your project doesn't need to target a specific .NET platform. The analyzers work for projects that target `net5.0`, later versions, as well as earlier .NET versions, such as `netcoreapp`, `netstandard`, and `net472`.
1717

1818
You can enable or install the first-party .NET analyzers in one of the following ways:
1919

2020
- **Enable from the .NET SDK:** Starting in Visual Studio 2019 16.8 and .NET 5.0, these analyzers are [included with the .NET SDK](/dotnet/fundamentals/code-analysis/overview), which is included with Visual Studio. Analysis is enabled, by default, for projects that target .NET 5.0 or later. You can enable code analysis on projects that target earlier .NET versions by setting the MSBUILD [EnableNETAnalyzers](/dotnet/core/project-sdk/msbuild-props#enablenetanalyzers) property to `true`. You can also disable code analysis for your project by setting `EnableNETAnalyzers` to `false`.
2121

22-
- **Install as a NuGet package:** If you don't want to move to the .NET 5+ SDK or if you prefer a NuGet package-based model, the analyzers are also available in the `Microsoft.CodeAnalysis.NetAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers) on Visual Studio 2019. You might prefer a package-based model for on-demand version updates. If you're on Visual Studio 2017, install the latest `2.9.x` version of the `Microsoft.CodeAnalysis.FxCopAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) instead.
22+
- **Install as a NuGet package:** If you don't want to move to the .NET 5+ SDK or if you prefer a NuGet package-based model, the analyzers are also available in the `Microsoft.CodeAnalysis.NetAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers) on Visual Studio 2019 and Visual Studio 2022. You might prefer a package-based model for on-demand version updates. If you're on Visual Studio 2017, install the latest `2.9.x` version of the `Microsoft.CodeAnalysis.FxCopAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/) instead.
2323

2424
> [!NOTE]
2525
> It is recommended that you enable the analyzers from the .NET SDK instead of installing the `Microsoft.CodeAnalysis.NetAnalyzers` [NuGet package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers), when possible. Enabling the analyzers from the .NET SDK ensures that you automatically get the analyzer bug fixes and new analyzers as soon as you update the SDK. In the NuGet model, you need to update the NuGet package each time you want the latest bug fixes. The NuGet package is updated more frequently.

0 commit comments

Comments
 (0)