Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.6 KB

ca0061.md

File metadata and controls

51 lines (32 loc) · 1.6 KB
description title ms.date ms.topic f1_keywords author ms.author manager ms.subservice monikerRange
The rule 'RuleId' could not be found.
CA0061
10/20/2016
reference
CA0061
mikejo5000
mikejo
mijacobs
code-analysis
vs-2019

CA0061

The rule 'RuleId' could not be found.

This error indicates that the specified rule could not be found.

This warning can be caused by an incorrectly formatted FxCopCmd.exe /RuleId option, an incorrectly formatted CodeAnalysisRules property value, or because the specified rule is in a rule assembly that FxCop is not using.

FxCopCmd /RuleId option

Use one of the following formats to specify a rule in the FxCopCmd.exe /RuleId option on the FxCopCmd command line:

  • FxCopCmd.exe /RuleId:- Category # RuleId

    where Category is the rule category and RuleId is the CheckId of the rule. For example:

    FxCopCmd /RuleId:-Microsoft.Design#CA2210

  • FxCopCmd.exe /RuleId:- Namespace # RuleId

    where Namespace is the rule category and RuleId is the check id of the rule. For example:

    FxCopCmd /RuleId:-Microsoft.Rules.Design#CA2210

MSBuild CodeAnalysisRules property

In Visual Studio Code analysis, rules can be specified by using the CodeAnalysisRules property of MSBuild with the following format:

<CodeAnalysisRules>-{Category|Namespace}#RuleId[;...]</CodeAnalysisRules>

For example

<CodeAnalysisRules>-Microsoft.Design#CA2210;-Microsoft.Rules.Managed.CA1062</CodeAnalysisRules>

See also

Code Analysis Application Errors