I'm hoping there is someway built into VS2010 to have custom rules involving preprocessor usage, and source-level style/member ordering.
Does it do source level, or catch preprocessor calls?
I'm hoping there is someway built into VS2010 to have custom rules involving preprocessor usage, and source-level style/member ordering.
Does it do source level, or catch preprocessor calls?
No. Like the introspection engine, the Phoenix-based data flow engine analyzes IL, not source code. If you're interested in writing rules that work against source code, StyleCop would be a better candidate tool than FxCop.
If you want to do source code analysis on C# or C++, you might consider our DMS Software Reengineering Toolkit and its C# Front End or C++ Front End.
DMS, using the corresponding front end, parses source text to abstract syntax trees, and then provides a large set of libraries to support the coding of custom analyzers.
In doing the parsing, it retains the preprocessor directives (as well as generics, comments, etc.) as part of the tree, and they can be analyzed just like the rest of the code.