So I’ve finally managed to get fxCop officially adopted on a work project (*). Better yet, thanks to an upgrade, we now are using the Ultimate Edition of Visual Studio: I no longer have to use the command line of fxCop . Instead, It’s integrated right into the build.
Of course, no improvement goes unpunished.
The way you configure fxCop changes when it’s integrated.
For example, the handling of custom dictionaries is entirely different. Instead of putting the CustomDictionary.xml file in just the right place, you add it to your project, and configure the build action to
In fact, it’s more work than this - as I want to reuse the same dictionary file across multiple projects. Here’s what I’ve ended up with …
CustomDictionary.xmlfile as a solution item.
Select “Add Existing Item …” within every project, adding the dictionary file as a link.
Ensure each link is configured with BuildAction CodeAnalysisDictionary.
I wonder what I’ll have to do with the immutable types list …
(*) This is much less important than it sounds. There are issues of architecture, performance and functionality that are much more important than mere static code analysis. But, all things being equal, I’ll take any tool that helps me do a better job.