Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FxCop / Code Analysis with VS2010 Ultimate

I've getting some information about this, but I still can find a proper answer, I was asked recently in my company for this : "run a fxcop analysis on that code and tell me the results".

Ok, I have VS2010 Ultimate which has code analysis, but before making any comment, I browse it on the internet cause I want to implement the best choice...

So, let's say I'm gonna use the same rules on both analyzers:

  • Should I recommend using one above the other?
  • Should I say "hey, thats kinda old, let's use code analysis!"
  • Should I get the same results on different computers? (for what I undersand, fxcop gives you some "points" and for what I've read, sometimes it gives you diff points on diff computers, I don't know about this with code analysis

Thanks, any help would be appreciated

like image 553
Luis Avatar asked Jun 06 '12 16:06

Luis


1 Answers

FxCop and Code Analysis are essentially the same thing, with the following differences:

  1. Code Analysis includes a VS IDE extension. FxCop can be executed from and show results within the IDE, but the result is not as full-featured. On the other hand, FxCop includes a stand-alone UI that is more full-features with respect to certain types of results exploration.
  2. Code Analysis includes more rules than FxCop. Part of this is because it includes an additional rules engine, but part is just extra rules that Microsoft decided we should pay for. (The extra rules can be run from FxCop if you want to see the results in the stand-alone FxCop UI.)

For any given rule, you should see exactly the same results on any given machine, regardless of which of the two tools you are using. The only cases in which you should see differences is when you do not specify culture settings for the FxCop analysis, and the system culture differs between machines.

like image 153
Nicole Calinoiu Avatar answered Sep 27 '22 19:09

Nicole Calinoiu