TeamCity 4.0 Help

FxCop

The FxCop Build Runner is intended for inspecting .NET assemblies reporting possible design, localization, performance, and security improvements.

You can customize FxCop build runner parameters using standard create edit build configuration dialog. Refer to the FxCop page of the UI Reference for detailed description of the FxCop build runner parameters fields.

When a build agent is started, it detects automatically whether FxCop is installed. If FxCop detected, TeamCity defines agent system property %\system.FxCopRoot%. This property is used as a default value of the FxCop installation root parameter of the FxCop. 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.

If you want to have line numbers information and "Open in IDE" feature, you should run FxCop build on the same machine as your compilation build, because FxCop requires source code to be present to display links to it.

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 Code Inspection tab of the build results page.

The service message format is described below:

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

Last modified: 20 April 2023