C# – Visual Studio Code Analysis vs StyleCop + FxCop

ccode analysisfxcopstylecopvisual-studio-2008

I used previously StyleCop + FxCop on my Visual Studio's projects. But now I am testing Visual Studio Code Analysis tool, which is easier to integrate into MSBuild, and I have found that this tools analyses some of the rules of both FxCop and StyleCop.

Is this tool a full replacement for both FxCop and StyleCop or does it just implement some of their rules?

Best Answer

Visual Studio includes FxCop + more.

From the developer blog of FxCop:

Sorry about my ignorance, but I assume FxCop is completely separate from the Code Analysis in VSTS? More specifically, I assume that if I install the new version of FxCop, VSTS will not take advantage (no shared code?)? If this is the case, any idea when these changes will make it into VSTS code analysis? Thanks!

That's correct, they are different products, however they do have a common engine. Visual Studio 2008 SP1 already comes with the same fixes and analysis (plus a little bit more), so there is no need to 'update' Visual Studio with the latest FxCop.

A developer blog also gave the exact rules which are in each.

As for StyleCop, it's independent of VS Code Analysis as described in this blog post, which links to Jader Dias' post.

Related Topic