Skip to content

Commit 70972df

Browse files
authored
Merge pull request #5650 from MicrosoftDocs/gewarren-patch-5
Add back VS 2017 instructions for installing fxcop analyzers
2 parents 8a71fbc + 479a573 commit 70972df

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ You can install these FxCop analyzers either as a NuGet package or as a VSIX ext
1818

1919
## NuGet package
2020

21-
You can install the [Microsoft.CodeAnalysis.FxCopAnalyzers](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers) NuGet package directly from the project's Code Analysis properties page:
21+
::: moniker range=">=vs-2019"
22+
23+
In Visual Studio 2019 version 16.3 and later, you can install the [Microsoft.CodeAnalysis.FxCopAnalyzers](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers) NuGet package directly from the project's Code Analysis properties page:
2224

2325
1. Right-click on the project node in **Solution Explorer**, select **Properties**, and then select the **Code Analysis** tab.
2426

@@ -29,6 +31,25 @@ You can install the [Microsoft.CodeAnalysis.FxCopAnalyzers](https://www.nuget.or
2931
Visual Studio installs the latest version of the Microsoft.CodeAnalyzers.FxCopAnalyzers package. The assemblies appear in **Solution Explorer** under **References** > **Analyzers**.
3032

3133
![Analyzers node in Solution Explorer](media/solution-explorer-analyzers-node.png)
34+
35+
If you're using an older version of Visual Studio 2019, install the package using either the [Package Manager Console](/nuget/quickstart/install-and-use-a-package-in-visual-studio#package-manager-console) or the [Package Manager UI](/nuget/quickstart/install-and-use-a-package-in-visual-studio#package-manager-console).
36+
37+
::: moniker-end
38+
39+
::: moniker range="vs-2017"
40+
41+
1. [Determine which analyzer package version](#fxcopanalyzers-package-versions) to install, based on your version of Visual Studio.
42+
43+
2. Install the package in Visual Studio using either the [Package Manager Console](/nuget/quickstart/install-and-use-a-package-in-visual-studio#package-manager-console) or the [Package Manager UI](/nuget/quickstart/install-and-use-a-package-in-visual-studio#package-manager-console).
44+
45+
> [!NOTE]
46+
> The nuget.org page for each analyzer package shows you the command to paste into the **Package Manager Console**. There's even a handy button to copy the text to the clipboard.
47+
>
48+
> ![NuGet.org page showing Package Manager Console command](media/nuget-package-manager-command.png)
49+
50+
The analyzer assemblies are installed, and they appear in **Solution Explorer** under **References** > **Analyzers**.
51+
52+
::: moniker-end
3253

3354
### Custom installation
3455

0 commit comments

Comments
 (0)