Custom FxCop rules and backward comparability


  • Hi,

    We have a custom FxCop rule to suppress part of an over eager rule in FxCop.

    I am trying to use VS11 with this new Rule and I cannot get it to find the Assembly/Type unless I change the "baseRuleTypeName" to Version 11. But doing that breaks VS2010 from been able to load the Rule.

    Here's our constructor from the Rule where we have to change the Version:

    public IdentifiersShouldNotContainNonguidTypeNames() :
    	base(name: "IdentifiersShouldNotContainNonguidTypeNames",
    		baseRuleTypeName: "Microsoft.FxCop.Rules.Naming.IdentifiersShouldNotContainTypeNames, NamingRules, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

    Does any have an experience making a rule that is compatabile with more than one version of FxCop / Visual Studio?

    In the mean time, we are recompiling it against 11, and keeping the assembly in the "Excluded" items in TFS to avoid checking it in. Less than ideal and a pain when we have to upgrade everyone to VS11.

    • Edited by Dave Shaw Thursday, March 01, 2012 2:05 PM
    Thursday, March 01, 2012 1:16 PM

All replies