TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

FxCop

Last modified: 20 April 2023

The FxCop Build Runner is intended for inspecting .NET assemblies reporting possible design, localization, performance, and security improvements. If you want TeamCity to display FxCop reports, you can either configure corresponding build runner, or import XML reports by means of service messages, if you prefer to run the FxCop tool directly from the script. On this page you will find:

Please see Supported Platforms and Environments page for the supported FxCop versions list.

FxCop Settings



When a build agent is started, it detects automatically whether FxCop is installed. If FxCop is detected, TeamCity defines agent system property %\system.FxCopRoot% which is then used as a default value for the FxCop installation root parameter of the FxCopRunnerSettings. If you do not have FxCop installed on a build agent, you still can specify a path to FxCop executable (e.g. you can place FxCop tool to your source control, and check it out with a build sources). This path should be relative to the Build Checkout Directory.

FxCop Options



Using Service Messages



If you prefer to call the FxCop tool directly from the script, not as a build runner, you can use the importData Build Script Interaction with TeamCity to import an xml file generated by FxCopCmd tool into TeamCity. In this case the FxCop tool results will appear in the Working with Build Results of the build results page.

The Build Script Interaction with TeamCity format is described below:

##teamcity[importData type='FxCop' path='<path to the xml file>']