TypeName | SA1646IncludedDocumentationXPathDoesNotExist |
CheckId | SA1646 |
Category | Documentation Rules |
An included Xml documentation link contains an invalid path.
C# syntax provides a mechanism for inserting documentation for classes and elements directly into the code, through the use of Xml documentation headers. For an introduction to these headers and a description of the header syntax, see the following article: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments.
As an alternative to authoring documentation directly within the code file, it is possible to place documentation for multiple elements within a separate Xml file, and then reference a section of that file within an element's documentation header. This causes the compiler to import the documentation for that element from the included document. For example:
/// <include file="IncludedDocumentation.xml" path="root/EnabledMethodDocs" />
public bool Enabled(bool true)
{
}
A violation of this rule occurs when the path attribute does not link to a valid path within the included documentation file.
To fix a violation of this rule, correct the value of the path attribute to point to a valid path within the file.
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1646:IncludedDocumentationXPathDoesNotExist", Justification = "Reviewed.")]
#pragma warning disable SA1646 // IncludedDocumentationXPathDoesNotExist
#pragma warning restore SA1646 // IncludedDocumentationXPathDoesNotExist