FxCop 1.36 Beta Released!


I’m pleased to announce that we’ve released a beta of the next version of FxCop. This release has a number of changes since FxCop 1.35, including, but not limited to, the following:

  • 200+ bug fixes that reduce noise, missing analysis and rule crashes
  • Support for analyzing anonymous methods and lambda expressions
  • New option for skipping analysis over tool generated code
    • Turn this on in the UI via Project -> Options -> Spelling & Analysis -> Suppress analysis results against generated code
    • Turn this on in the command-line via /ignoregeneratedcode switch.
  • Better support for C++/CLI and the Compact Framework
  • Language ‘friendly’ API names in the UI and resolutions (ie Visual Basic syntax if running over a Visual Basic binary)
  • New globalization, design and usage rules
  • Performance improvements that cut analysis by 2x and use half as much memory
  • Documentation that is now available on MSDN

There are also some other underlying changes that I will talk about in some future posts.

Download it, and tell us what you think. If you have any feedback, bug reports or any questions, feel free to head over to the Code Analysis forum and ask away.

Comments (22)

  1. Microsoft ha publicado una nueva versión de FxCop en versión Beta 2, se trata de FxCop 1.36 Beta 2. La

  2. Franck Jeannin says:

    Can we expect anything on race condition detection in the future? What happened to the work on RaceTrack done by Microsoft Research back in 2004?! Can Spec# help?

  3. The Visual Studio Code Analysis Team Blog announces the release of FxCop 1.36 Beta.This new version contains

  4. It is time for another weekly roundup of news that focuses on .NET, agile and general development related

  5. CoqBlog says:

    Une version beta du prochain FxCop (la version standalone) est disponible . Il supporte l’analyse d’assemblies

  6. Joe K says:

    Does Code Analysis in Visual Studio 2008 have these improvements as well? I remember reading that Code Analysis got spell checking but not sure how directly FxCop and Visual Studio Code Analysis are related.

  7. Scott Jones says:

    How about some documentation on the diffs in the fxcop sdk between 1.35 & 1.36, for us custom rule authors?  It appears that a lot of functionality in RuleUtilities was farmed out to other classes.  In some cases, it’s easy to find the new functionality.  In other cases, not so much.

  8. Scott Jones says:

    I might also add that David Kean’s custom rules no longer build with FxCop 1.36, due to all the breaking sdk changes.

  9. .NET slave says:

    New FxCop 1.36 beta 2 released

  10. Franck Jeannin says:

    If you wonder why SuppressMessage works in FxCop 1.36/VS2008 and not in FxCop 1.35, notice the subtle difference in the syntax.

    FxCop1.36/VS2008

    [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "MyNamespace.MyClass.#MyMethod()")]

    FxCop1.35

    [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "MyNamespace.MyClass.MyMethod():System.Void")]

    When in doubt, you can use the right click/Copy As->SuppressMessage command in FxCop to place the correct syntax in the clipboard.

  11. Mike Hudgell says:

    Is there any plans to add support for drop it-in over the fxcopcmd that VS2005 Code Analysis uses…

    There appears to be an issue with parsing the rules path atm…

  12. Manu says:

    Is there any way to suppress the same FXCop warning that is being reported multiple times with a SuppressMessage attribute?

  13. Eugenez says:

    Dear team,

    Thank you for the release; but could you provide list of deprecated rules?

    I have found that the following at least are different:

    – Performance rules, DisposeMethodsShouldCallSuppressFinalize missing

    – Performance rules, DoNotConcatenateStringsInsideLoops missing

    – Usage rules, DoNotMarkEnumsWithFlags does not seem to work anymore

    – Usage rules, NonConstantFieldsShouldNotBeVisible does not seem to work anymore

    Am wating for the answer as I kinda hated ploughing through the rules trying to figure out what works and what does not.

    Thanks, Eugene

  14. Colin Bowern says:

    How does this related to the pending VS2008 release?  Can we upgrade the out-of-the-box code analysis in VS2005/2008 with the latest fxcop?

  15. Mike: There will be no support to drop it over the version of FxCop in Visual Studio 2005. There have been changes to the output format that make it incompatible.

    Manu: Typically no. SuppressMessage only suppresses an instance of 1 warning. If you want to suppress it multiple times, consider turning the rule off.

    Eugenez: DisposeMethodsShouldCallSuppressFinalize has been moved and renamed to UsageCallGCSuppressFinalizeCorrectly.

    The following rules have been removed (most of them were part of our data flow engine that has been discontinued – we will be replacing them in a future version):

    ValidateArgumentsOfPublicMethods

    DoNotPassLiteralsAsLocalizedParameters

    AvoidUnnecessaryStringCreation

    DoNotCallPropertiesThatCloneValuesInLoops

    DoNotConcatenateStringsInsideLoops

    ReviewSqlQueriesForSecurityVulnerabilities

    AssembliesShouldDeclareMinimumSecurity

    DisposeMethodsShouldCallBaseClassDispose

    ProvideCorrectArgumentsToFormattingMethods

    The following rules have been renamed/merged into other rules:

    LongAcronymsShouldBePascalCased

    ShortAcronymsShouldBeUppercase

    AvoidTypeNamesInParameters

    AvoidLanguageSpecificTypeNamesInParameters

    AvoidTypeNamesInParameters

    SecureGetObjectDataOverrides

    DoNotRaiseExceptionsInFilterBlocks

    With regards to the two rules that don’t work, can you head over the FxCop forum and provide us a repro?

    Colin: You will not be able to update 2005 with the latest version and will we have made changes to allow 2008 to be updated – there is no need, it comes with the latest analysis (and actually has more analysis than FxCop).

  16. Eli Allen says:

    While 2008 may at present be up to date with fxcop rules I’m going to guess that new rules will be made in the future so it will still be useful to be able to update the fxcop rules.

  17. davkean says:

    Eli: Rules that are in Visual Studio 2008 and not in FxCop 1.36 will never make it into later in a future version. Visual Studio will always remain superset of what is available in the free FxCop.

  18. Denis says:

    What is most likely time of production release of FxCop 1.36?

  19. davkean says:

    Denis: We haven’t announced the exact date, however, it will likely be at the start of next year.

  20. Paraesthesia says:

    FxCop 1.35 Spell Checking Uses Office 2003

  21. This post is not about creating custom rules for FxCop because there are already some resources on the