共用方式為


CA0054

自訂規則組件具有無效的 XML 資源。

如果自訂規則組件具有無效的 XML 資源,用以說明其規則,則會發生這個警告。 正確的格式如下:

<Rules FriendlyName="Customer Rules">

<Rule TypeName="[The unqualified type name of the rule]" Category="[A category name such as Customer.Usage]" CheckId="[An identifier for the rule that is at least unique within the same category]">

<Name>[Localized version of the type name, this is the rule name that appears in the UI]</Name>

<Description>[A sentence describing the rule in more detail than the name].</Description>

<Url>[A URL pointing to a documentation or info about the rule]</Url>

<Resolution>[Format string for rule messages].</Resolution>

<Email>[Email Address]</Email>

<MessageLevel Certainty="[A number from 0 to 100]">[Error or Warning]</MessageLevel>

<FixCategories>[NonBreaking or Breaking]</FixCategories>

<Owner>[Rule owner name or group]</Owner>

</Rule>

</Rules>

請參閱

概念

在 Application Lifecycle Management 工具中疑難排解錯誤的資源

其他資源

程式碼分析應用程式錯誤