If writing my own static code analysis rules (for C# code), what are the pros and cons of using StyleCop vs FxCop?
Is one more appropriate for certain type of analysis than the other? Or is the difference between the two that one runs on the source code and the other on the compiled assembly?
A key difference is that StyleCop analyzes C# source code. FxCop analyzes .NET assemblies after they are compiled, it works for any language. Accordingly, StyleCop is picky about how your source code looks. FxCop is picky about how you use the .NET framework classes. They complement each other.