Visual Studio 2015 Code Analysis vs FxCopCmd.exe difference

Pinte Dani picture Pinte Dani · Nov 23, 2015 · Viewed 7.2k times · Source

I recently installed Visual Sudio 2015 and was able to run code analysis for the solution with the following command:

msbuild.exe MySolution.sln /p:RunCodeAnalysis=true

where /p:RunCodeAnalysis=true performs the code analysis. Actually this calls the FxCopCmd.exe located in

C:\Program Files(x86)\Microsoft Visual Studio 14.0\Team Tools\Static AnalysisTools\FxCop\FxCopCmd.exe

Code Analysis was meant to replace FxCop, but actually Code Analysis executes itself FxCopCmd.exe

Maybe I miss something, but what is the difference between VS Code Analysis and FxCop?

Answer

Nicole Calinoiu picture Nicole Calinoiu · Nov 23, 2015

FxCop and VS Code Analysis are essentially the same thing. They use the same core analysis engine (triggered via fxcopcmd.exe) and ship with the same core set of rules. Besides UI distinctions, the main difference betweeen FxCop and VS Code Analysis is that the latter includes some extra rules (in the DataflowRules.dll, MaintainabilityRules.dll, and ReliabilityRules.dll assemblies), plus a dataflow analysis engine that supports a subset of these additional rules.