BuildCop is a tool that analyzes MSBuild project files (interactively or during e.g. a daily build) according to a customizable set of rules and generates reports - e.g. is strong naming enabled, are certain project properties set correctly, is XML documentation being generated, are assembly references correct, are naming conventions respected, ...
BuildCop consists of a command-line tool and an XML configuration file. When the application is run, it will read the configuration file to figure out which files to analyze, which rules to run, and which reports to generate.
Basic usage looks as follows:
- Define the configuration file: this XML file determines the actions that BuildCop takes; see below for the details of the configuration file.
- Run the tool: this can be done interactively on the command-line or in an automated way, e.g. during a daily build.
- Open the report(s): the generated reports contain the results of the analysis and allow you to take appropriate actions to correct issues in MSBuild files; various reporting options (to the console, or to a XML, HTML or CSV file) are provided out of the box.
- Create additional rules and/or formatters: BuildCop is created with extensibility in mind, so if you would like to extend BuildCop to run additional rules or provide additional reporting formats, it's quite easy to provide custom rules and formatters.
In the future, an additional GUI application could be foreseen to run the rules interactively in a rich Windows application, and to edit configuration files, but those are currently not implemented yet. Of course, feel free to contact me if you want to contribute to the project!
- Configuration: Provides details on how to configure the application.
- Built-In Rules: Lists the built-in rules and explains how to configure them.
- Built-In Formatters: Lists the built-in formatters and explains how to configure them.
- Customization: Provides details on how to add custom rules and formatters.
A slightly better version of the documentation is also included in the released download package, where everything is bundled in one compiled help (chm) file.