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:
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 FxCop build runner settings. 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.
| What to inspect
|| Check one of the following options to specify object to inspect (either particular assemblies or a project)
|| Enter paths, relative to the Build Checkout Directory and separated by spaces, to inspected assemblies (use ant-like wildcards to select files by mask). FxCop will use default settings to inspect them. Enter exclude wildcards to refine included assemblies list.
|| Enter the path (relative to the Build Checkout Directory) to previously prepared FxCop project from FxCop GUI
| Search referenced assemblies in GAC
|| Search assemblies, referenced by targets, in Global Assembly Cache
| Search referenced assemblies in directories
|| Search assemblies, referenced by targets, in specified directories separated by spaces
| Ignore generated code
|| New option introduced in FxCop 1.36. Speeds up inspection
| Report XSLT file
|| The path to XSLT transformation file, relative to the Build Checkout Directory or absolute on agent machine. You can use path to detected FxCop on target machine (i.e. "%system.FxCopRoot%/Xml/FxCopReport.xsl"). When Report XSLT file option is set, the build runner will apply XSLT transform to FxCop XML output and display resulting HTML to a new tab "FxCop" on the build results page.
| Additional FxCopCmd options
|| Additional options for calling FxCopCmd executable. All options entered in this field will be added to the beginning of command line parameters
| FxCop installation root
|| Mandatory parameter. Specify the path to the FxCop installation root on an agent machine, or a path to the FxCop executable relative to the Build Checkout Directory. Default value set to "%system.FxCopRoot%" means that FxCop is detected automatically on agent machine.
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 service messages 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 agent will import the specified xml file in the background. Please make sure that the xml file is not deleted right after the importData message is sent.|