locked
Custom FxCop rules and backward comparability

    Question

  • 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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    {
    }

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

    EDIT:
    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