Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

FxCop

view on GitHub

FxCop is a free, static code analysis tool from Microsoft that checks .NET managed code assemblies for conformance to Microsoft's .NET Framework Design Guidelines. While technically speaking FxCop is deprecated in favor of Roslyn Analyzers, many projects still depend on it for code quality.

Running FxCop

FxCop is executed during a build in Visual Studio, and also by the FxCopCmd.exe utility that ships with Visual Studio Enterprise.

Running FxCop in BuildMaster

Any configured Roslyn Analyzers will already automatically be executed during the build process as long as a project's NuGet packages are restored, and the project is compiled with MSBuild.

Alternatively, BuildMaster can execute FxCop in a build or deploy plan, then capture the output from the report into a build report.

Pre-requisites:

Example plan:

Exec "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe"
(
    Arguments: /out:report.xml 
);
 
Capture-FileReport
(
    Path: report.xml
);