Skip to content

Commit b9a32c3

Browse files
authored
Merge pull request #2952 from MicrosoftDocs/master
9/18 AM Publish
2 parents 7b87443 + bc47262 commit b9a32c3

12 files changed

+70
-20
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: FxCop code analysis and FxCop analyzers
3+
ms.date: 09/06/2018
4+
ms.prod: visual-studio-dev15
5+
ms.technology: vs-ide-code-analysis
6+
ms.topic: overview
7+
helpviewer_keywords:
8+
- "code analysis FAQ"
9+
author: gewarren
10+
ms.author: gewarren
11+
manager: douge
12+
ms.workload:
13+
- "dotnet"
14+
---
15+
# Frequently asked questions about FxCop and FxCop analyzers
16+
17+
It can be a little confusing to understand the differences between legacy FxCop and FxCop analyzers. This article aims to address some of questions you might have.
18+
19+
## What's the difference between legacy FxCop and FxCop analyzers?
20+
21+
Legacy FxCop runs post-build analysis on a compiled assembly. It runs as a separate executable called **FxCopCmd.exe**. FxCopCmd.exe loads the compiled assembly, runs code analysis, and then reports the results (or *diagnostics*).
22+
23+
FxCop analyzers are based on the .NET Compiler Platform ("Roslyn"). You [install them as a NuGet package](install-fxcop-analyzers.md#to-install-fxcop-analyzers-as-a-nuget-package) that's referenced by the project or solution. FxCop analyzers run source-code based analysis during compiler execution. FxCop analyzers are hosted within the compiler process, either **csc.exe** or **vbc.exe**, and run analysis when the project is built. Analyzer results are reported along with compiler results.
24+
25+
> [!NOTE]
26+
> You can also [install FxCop analyzers as a Visual Studio extension](install-fxcop-analyzers.md#to-install-fxcop-analyzers-as-a-vsix). In this case, the analyzers execute as you type in the code editor, but they don't execute at build time. If you want to run FxCop analyzers as part of continuous integration (CI), install them as a NuGet package instead.
27+
28+
## Does the Run Code Analysis command run FxCop analyzers?
29+
30+
No. When you select **Analyze** > **Run Code Analysis** in Visual Studio 2017, it executes static code analysis or legacy FxCop. **Run Code Analysis** has no effect on Roslyn-based analyzers, including the Roslyn-based FxCop analyzers.
31+
32+
## Does the RunCodeAnalysis msbuild project property run analyzers?
33+
34+
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.
35+
36+
## So how do I run FxCop analyzers then?
37+
38+
To run FxCop analyzers, first [install the NuGet package](install-fxcop-analyzers.md) for them. Then build your project or solution from Visual Studio or using msbuild. The warnings and errors that the FxCop analyzers generate will appear in the **Error List** or the command window.
39+
40+
## See also
41+
42+
- [Overview of .NET Compiler Platform analyzers](roslyn-analyzers-overview.md)
43+
- [Get started with analyzers](fxcop-analyzers.yml)
44+
- [Install FxCop analyzers](install-fxcop-analyzers.md)

docs/code-quality/fxcop-analyzers.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ abstract:
2121
src: https://docs.microsoft.com/media/illustrations/bcs-partner-advanced-management-settings-8.svg
2222
title:
2323
sections:
24+
- title: Frequently asked questions
25+
items:
26+
- html: Get answers to some <a href="fxcop-analyzers-faq.md">frequently asked questions</a> about the differences between FxCop and analyzers.
27+
2428
- title: If you're new to code analysis...
2529
items:
2630
- type: list

docs/code-quality/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
items:
2929
- name: Code analysis for managed code
3030
items:
31+
- name: FAQ for FxCop analyzers
32+
href: fxcop-analyzers-faq.md
3133
- name: Migrate from FxCop
3234
href: fxcop-analyzers.yml
3335
items:

docs/extensibility/visual-cpp-project-extensibility.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.workload: ["vssdk"]
1313
---
1414
# Visual Studio C++ Project system extensibility and toolset integration
1515

16-
The *Visual C++ Project system* is used by .vcxproj files. It's based on the [Visual Studio Common Project System (CPS)](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/Index.md) and provides additional, C++ specific extensibility points for easy integration of new toolsets, build architectures and target platforms.
16+
The *Visual C++ Project system* is used for .vcxproj files. It's based on the [Visual Studio Common Project System (CPS)](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/Index.md) and provides additional, C++ specific extensibility points for easy integration of new toolsets, build architectures and target platforms.
1717

1818
## C++ MSBuild targets structure
1919

@@ -220,13 +220,13 @@ If you look at the targets, such as `_ClCompile`, you'll see they don't do anyth
220220
</Target>
221221
```
222222

223-
`ClCompile` and other build tool-specific targets are defined as empty targets in Microsoft.CppBuild.targets:
223+
`ClCompile` and other build tool-specific targets are defined as empty targets in *Microsoft.CppBuild.targets*:
224224

225225
```xml
226226
<Target Name="ClCompile"/>
227227
```
228228

229-
Because the `ClCompile` target is defined as an empty target in *Microsoft.CppBuild.targets*, unless it is overridden by a toolset, no real build action is performed. The toolset targets can override the `ClCompile` target, that is, they can contain another `ClCompile` definition after importing *Microsoft.CppBuild.targets*:
229+
Because the `ClCompile` target is empty, unless it is overridden by a toolset, no real build action is performed. The toolset targets can override the `ClCompile` target, that is, they can contain another `ClCompile` definition after importing *Microsoft.CppBuild.targets*:
230230

231231
```xml
232232
<Target Name="ClCompile"
@@ -236,7 +236,7 @@ Because the `ClCompile` target is defined as an empty target in *Microsoft.CppBu
236236
</Target>
237237
```
238238

239-
Despite the name `ClCompile`, which was created before Visual Studio implemented cross-platform support, the `ClCompile` target doesn't have to call CL.exe. It can also call Clang, gcc, or other compilers by using appropriate MSBuild tasks.
239+
Despite its name, which was created before Visual Studio implemented cross-platform support, the `ClCompile` target doesn't have to call CL.exe. It can also call Clang, gcc, or other compilers by using appropriate MSBuild tasks.
240240

241241
The `ClCompile` target should not have any dependencies except the `SelectClCompile` target, which is required for the single file compile command to work in the IDE.
242242

@@ -282,7 +282,7 @@ If you need to create a new task for a build tool, you can choose from the follo
282282

283283
1. If you want better task performance or just need more complex functionality, use the regular MSBuild [task writing](../msbuild/task-writing.md) process.
284284

285-
If not all inputs and outputs of the tool are listed on the tool command line, as in the `CL`, `MIDL`, and `RC` cases, and if you want automatic input and output file tracking and .tlog file creation, derive your task from `TrackedVCToolTask`.
285+
If not all inputs and outputs of the tool are listed on the tool command line, as in the `CL`, `MIDL`, and `RC` cases, and if you want automatic input and output file tracking and .tlog file creation, derive your task from the `Microsoft.Build.CPPTasks.TrackedVCToolTask` class. At present, while there is documentation for the base [ToolTask](/dotnet/api/microsoft.build.utilities.tooltask) class, there are no examples or documentation for the details of the `TrackedVCToolTask` class. If this would be of particular interest, add your voice to a request on [developercommunity.visualstudio.com](https://developercommunity.visualstudio.com/spaces/62/index.html).
286286

287287
## Incremental builds and up-to-date checks
288288

@@ -421,7 +421,7 @@ To use `Task.HostObject` to get the unsaved content of source files, the targets
421421
@="{83046B3F-8984-444B-A5D2-8029DEE2DB70}"
422422
```
423423

424-
## Project extensibility in the Visual Studio IDE
424+
## Visual C++ project extensibility in the Visual Studio IDE
425425

426426
The Visual C++ project system is based on the [VS Project System](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/Index.md), and uses its extensibility points. However, the project hierarchy implementation is specific to Visual C++ and not based on CPS, so hierarchy extensibility is limited to project items.
427427

@@ -650,6 +650,6 @@ For information on how to create VSIX files, see [Shipping Visual Studio Extensi
650650

651651
The Microsoft Build System ([MSBuild](../msbuild/msbuild.md)) provides the build engine and the extensible XML-based format for project files. You should be familiar with basic [MSBuild concepts](../msbuild/msbuild-concepts.md) and with how [MSBuild for Visual C++](/cpp/build/msbuild-visual-cpp-overview) works in order to extend the Visual C++ project system.
652652

653-
The Managed Extensibility Framework ([MEF](/dotnet/framework/mef/)) provides the extension APIs that are used by CPS and the Visual C++ project system. For an overview of how MEF is used by CPS, see [MEF](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/mef.md).
653+
The Managed Extensibility Framework ([MEF](/dotnet/framework/mef/)) provides the extension APIs that are used by CPS and the Visual C++ project system. For an overview of how MEF is used by CPS, see [CPS and MEF](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/mef.md#cps-and-mef) in the [VSProjectSystem overview of MEF](https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/mef.md).
654654

655655
You can customize the existing build system to add build steps or new file types. For more information, see [MSBuild (Visual C++) Overview](/cpp/build/msbuild-visual-cpp-overview) and [Working with project properties](/cpp/ide/working-with-project-properties).

docs/ide/quickstart-aspnet-core.experimental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
- "aspnet"
1717
- "dotnetcore"
1818
experimental: false
19-
experiment_id: "eb51ee6c-71a8-45"
19+
experiment_id: "bef9e21b-00d0-4b"
2020
---
2121
# Quickstart: Use Visual Studio to create your first ASP.NET Core web app
2222

docs/ide/quickstart-aspnet-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.workload:
1616
- "aspnet"
1717
- "dotnetcore"
1818
experimental: true
19-
experiment_id: "eb51ee6c-71a8-45"
19+
experiment_id: "bef9e21b-00d0-4b"
2020
---
2121
# Quickstart: Use Visual Studio to create your first ASP.NET Core web app
2222

docs/install/create-an-offline-installation-of-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Create an Offline Installation of Visual Studio"
2+
title: "Create an offline installation of Visual Studio"
33
description: "Learn how to install Visual Studio offline when you have an unreliable internet connection or low bandwidth."
44
ms.custom: ""
55
ms.date: 08/28/2018

docs/test/create-unit-tests-menu.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: "Create unit test method stubs in Visual Studio"
2+
title: Create unit test method stubs
33
ms.date: 05/02/2017
44
ms.prod: visual-studio-dev15
55
ms.technology: vs-ide-test
66
ms.topic: conceptual
77
helpviewer_keywords:
88
- "unit testing, create unit tests"
9+
author: gewarren
910
ms.author: gewarren
1011
manager: douge
1112
ms.workload:
1213
- "multiple"
13-
author: gewarren
1414
---
1515
# Create unit test method stubs with the Create Unit Tests command
1616

docs/test/intellitest-manual/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: "Creating unit test method stubs with the Create Unit Tests command"
2+
title: "Introduction to IntelliTest"
33
ms.date: 05/02/2017
44
ms.prod: visual-studio-dev15
55
ms.technology: vs-ide-test
66
ms.topic: conceptual
7-
helpviewer_keywords:
7+
helpviewer_keywords:
88
- "IntelliTest, Get started"
99
ms.author: gewarren
1010
manager: douge
11-
ms.workload:
11+
ms.workload:
1212
- "multiple"
1313
author: gewarren
1414
---

docs/test/lab-management/use-build-or-rm-instead-of-lab-management.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Use Build or Release Management for automated testing in Visual Studio"
2+
title: "Use build or release management for automated testing"
33
ms.date: 03/02/2018
44
ms.prod: visual-studio-dev15
55
ms.technology: vs-ide-test
@@ -12,7 +12,7 @@ ms.workload:
1212
- "multiple"
1313
author: gewarren
1414
---
15-
# Use Build and Release Management instead of Lab Management for automated testing
15+
# Use Azure Test Plans instead of Lab Management for automated testing
1616

1717
If you use Microsoft Test Manager (MTM) and Lab Management for automated testing or for build-deploy-test automation, this topic explains how you can achieve the same goals using the [build and release](/azure/devops/pipelines/index?view=vsts) features in Team Foundation Server (TFS) and Azure Test Plans.
1818

@@ -58,7 +58,7 @@ The following table summarizes the typical activities you perform in Lab Center,
5858
| Connect to machines. | Open the lab environment in Environment viewer. | Use SCVMM administration console directly to connect to the virtual machines. Alternatively, use the IP address or DNS names of the virtual machines to open remote desktop sessions. |
5959
| Take a checkpoint of an environment, or restore an environment to a clean checkpoint. | Open the lab environment in Environment viewer. Select the option to take a checkpoint or to restore to a previous checkpoint. | Use SCVMM administration console directly to perform these operations on virtual machines. Or, to perform these steps as part of a larger automation, include the checkpoint tasks from the [SCVMM Integration extension](https://marketplace.visualstudio.com/items?itemname=ms-vscs-rm.scvmmapp) as part of the environment in a release definition. |
6060

61-
## Creation of network isolated environments
61+
## Create network-isolated environments
6262

6363
A network isolated lab environment is a group of SCVMM virtual machines that can be cloned safely without causing network conflicts. This was done in MTM using a series of instructions that used a set of network interface cards to configure the virtual machines in a private network, and another set of network interface cards to configure the virtual machines in a public network.
6464

docs/vs-2015/msbuild/msbuild-inline-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ MSBuild tasks are typically created by compiling a class that implements the <xr
103103
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" >
104104
<ParameterGroup />
105105
<Task>
106-
<Reference Include="System.Xml.dll"/>
106+
<Reference Include="System.Xml"/>
107107
<Using Namespace="System"/>
108108
<Using Namespace="System.IO"/>
109109
<Code Type="Fragment" Language="cs">

subscriptions/vscloud-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: How to buy Visual Studio Enterprise and Visual Studio Professional cloud subscriptions
2+
title: How to purchase Visual Studio cloud subscriptions
33
author: evanwindom
44
ms.author: jaunger
55
manager: evelynp

0 commit comments

Comments
 (0)