Fx Cop Step
An FxCop build step is intended for inspecting .NET assemblies and reporting possible design, localization, performance, and security improvements.
Example. Runs FxCop for the specified assembly files and reports inspections results to the TeamCity server. The location of the FxCop installation on the agent is determined automatically.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
fxCop {
fxCopInstallation = auto {
version = FxCopStep.FxCopVersion.v16_0
}
inspectionSource = assemblies {
files = "build/*.dll"
}
}
Content copied to clipboard }
}
See also
Constructors
Properties
Additional options for calling FxCopCmd executable. All entered options will be added to the beginning of the command line parameters.
Optional collection of build step execution conditions
Build step execution mode
Fails build on analysis errors from FxCop such as: ANALYSIS_ERROR, ASSEMBLY_LOAD_ERROR, ASSEMBLY_REFERENCES_ERROR, PROJECT_LOAD_ERROR, RULE_LIBRARY_LOAD_ERROR, UNKNOWN_ERROR, OUTPUT_ERROR
When a build agent is started, it detects automatically whether FxCop is installed. If FxCop is detected, TeamCity defines the %system.FxCopRoot% agent system property. You can also use a custom installation of FxCop or the use FxCop checked in your version control.
Sets /ignoregeneratedcode for FxCopCmd (note: it's supported since FxCop 1.36). Speeds up inspection.
The path to the XSLT transformation file relative to the Build Checkout Directory or absolute on the agent machine. You can use the path to the detected FxCop on the target machine (i.e. %system.FxCopRoot%/Xml/FxCopReport.xsl). When the Report XSLT file option is set, the build runner will apply an XSLT transform to FxCop XML output and display the resulting HTML in a new FxCop tab on the build results page.
Search the assemblies referenced by targets in the specified directories separated by spaces. Sets /d: options for FxCopCmd
Search the assemblies referenced by targets in Global Assembly Cache.
Functions
Select to use the FxCop installation on an agent.
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Select to use a custom installation of FxCop (not the autodetected one), or if you do not have FxCop installed on the build agent (for example, you can place the FxCop tool in your source control, and check it out with the build sources).
Validates this object and reports found errors to the provided consumer