FxCop is a code analysis tool created by Microsoft, which can help identify potential problem areas and can help enforce best practices. We will discuss how we can integrate FxCop into the build process here. Similar to the NUnit task, there also is an FxCop task, also provided by the Microsoft Community Tasks project. We will use this task to execute the FxCop tool against the binaries of our projects. In the following example we will execute FxCop against the Examples.Tasks and Example.Loggers project. Another related tool, which we will not demonstrate here, is StyleCop. StyleCop is a source code analysis tool; it examines the actual source files to ensure that styling guidelines are followed and to spot potential rule violations.

Similar ...

Get Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.