Team System Developer Center > Visual Studio Team System Forums > Visual Studio Code Analysis and Code Metrics > What's the difference between FxCop and Code Analysis in VS2005?
Ask a questionAsk a question
 

AnswerWhat's the difference between FxCop and Code Analysis in VS2005?

  • Thursday, September 07, 2006 4:18 PMJohnnyZ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am a beginer of FxCop and confused by FxCop and Code Analysis tool in VS2005.  Here is my assumption to my understanding:

    Both of them would be doing same thing if the custom rules are not needed.  But I can develop some custom rules against FxCop, not Code Anaylysis.  Code Analysis is only a simple tool in VS2005 with built-in .net framework coding rules. 

    Please correct me if anything is wrong, and provide more information.  Thanks a lot!

     

Answers

All Replies

  • Tuesday, September 12, 2006 3:25 PMPeter RitchieMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    They're essentially the same thing, with slightly different engines.  They each have the same basic subset of rules they cover; but, each has some distinct rules the other doesn't catch.
  • Tuesday, September 12, 2006 6:07 PMJeffrey van Gogh - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Several naming (spelling) rules are not included in Visual Studio 2005 due to time constraints in providing custom dictionary & localization support. Other than that Code Analysis in Visual Studio 2005 is a superset of the standalone version of FxCop. The additional rules in Visual Studio 2005 are in the Maintainability (http://msdn2.microsoft.com/en-us/library/ms182211.aspx) & Reliability (http://msdn2.microsoft.com/en-us/library/ms182287.aspx) areas.

    Regards,

     

    Jeffrey

  • Wednesday, April 04, 2007 6:13 PMShannon Wagner Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We've run into an issue where the cross-section of functionality that each edition of Visual Studio Team Edition provides is causing confusion and loss of functionality for certain team members.

    Since I've been the team member doing most of the testing, I've installed the Tester Edition (this seems to be the only edition which includes the unit test runner and also the full-featured test manager which allows me to use test lists).

    Other team members have installed the Developer Edition, which gives them limited functionality when managing test runs, but gives them all sorts of nice functionality for code analysis.

    I've been using FxCop for code analysis, and when I discovered the extra rules which a team member is using for code analysis within the IDE, I tried to load those into FxCop (I figured I could deal with a lack of IDE integration and just use the standalone product, but I really wanted to use the same set of rules as the rest of the team).  But the Visual Studio rules won't load at all in the standalone FxCop.

    So far as I can tell, there is not a way to install Visual Studio 2005 with a full set of tools for both testing and code analysis.  Since that seems just plain silly, I'm hoping that I've overlooked something.

    Can anyone offer any guidance?

  • Wednesday, April 04, 2007 6:18 PMPeter RitchieMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Unit testing will be expanding to be included in Visual Studio Pro in the next release (code-named Orcas).  see http://blogs.msdn.com/robcaron/archive/2007/03/27/1969527.aspx

     

  • Wednesday, April 04, 2007 6:26 PMPeter RitchieMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     Peter Ritchie wrote:

    Unit testing will be expanding to be included in Visual Studio Pro in the next release (code-named Orcas).  see http://blogs.msdn.com/robcaron/archive/2007/03/27/1969527.aspx

     

    Some clarification, I'm inferring since all Visual Studio Team Editions inherit from Visual Studio Pro, Unit testing will be available in all Visual Studio Team Editions.
  • Wednesday, April 04, 2007 7:08 PMShannon Wagner Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Your response doesn't really address my concern.  The blog you cited states that "the majority of the unit testing features of Team System [will be added] to the Pro Sku of Visual Studio".  The majority of the unit testing features of the Test Edition are already included in the Software Developer Edition.  However, a feature which I don't think anyone should have to do without (test lists) is missing, so far as I can tell (I may be wrong, but I don't think I am).

    Likewise, the majority of the features of the Software Developer Edition are included in the Tester Edition, but code analysis is missing and there doesn't seem to be a way to add it without missing some functionality.

    I hope that Microsoft will learn a lesson from SharpDevelop.  Granted SharpDevelop still needs work, but it overcomes what I think is an important deficiency in Visual Studio 2005 by providing the IDE as a framework into which other functionality from other products can be easily integrated.

    While the features of the next Visual Studio release may be exciting, unless the next version is going to be distributed free-of-charge to anyone who has licensed Visual Studio 2005, it really benefits Microsoft more than it benefits the developers (i.e., Microsoft gets money, develops merely getting a long-awaited solution to a useability bug that has already cost them in lost productivity).