FxCop rules are organized into DLL assemblies (which can be created as Class Library projects in Visual Studio). Each assembly, when loaded into FxCop, displays its rules in the GUI as leaf nodes in a hierarchical tree.
Each rule assembly should directly reference two assemblies provided with FxCop. These two assemblies are located in the Program Files\Microsoft FxCop 1.36 folder:
The only namespace that needs to be imported to use the API is
Visual Studio Team System: To add a custom rule
assembly to Visual Studio Code Analysis, copy
the DLL to
c:\Program Files\Microsoft Visual Studio 9.0\Team
Tools\Static Analysis Tools\FxCop\Rules, where
c:\ reflects the drive where Visual
Studio is installed.