You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a field contains XML documentation that includes other XML documentation, the analyzer throws several exceptions as follows:
Via msbuild:
CSC : warning AD0001: Analyzer 'StyleCop.Analyzers.DocumentationRules.SA*' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. [Project.csproj]
Via CSC:
warning AD0001: Analyzer 'StyleCop.Analyzers.DocumentationRules.SA*' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null.
Parameter name: s'
(The '*' above is 1625, 1629, 1616, 1612, and other checks relating to XML documentation.) The message doesn't include a stack trace, which made it very hard to investigate the cause of the exception.
Note that this issue applies only to fields, not to methods, constructors, types, or properties, which are generally handled by the analyzer without throwing an exception.
Here is a class which exhibits this issue.
namespace MyNamespace {
public class MyClass {
/// <include file='docs.xml'
/// path='docs/doc[@name="F:MyNamespace.MyClass.Field"]/*'/>
public const int Field = 0;
}
}
Note that the include file references a file called docs.xml, which is as follows for the purposes of this report:
<docs><doc name="F:MyNamespace.MyClass.Field">
<summary>A field summary.</summary></doc></docs>
The text was updated successfully, but these errors were encountered:
@sharwell: I am unable to reproduce this with versions after 1.2.0-beta.333, which includes the fix for #3150. I suggest closing this as already fixed.
Currently, when a field contains XML documentation that includes other XML documentation, the analyzer throws several exceptions as follows:
Via msbuild:
Via CSC:
(The '*' above is 1625, 1629, 1616, 1612, and other checks relating to XML documentation.) The message doesn't include a stack trace, which made it very hard to investigate the cause of the exception.
Note that this issue applies only to fields, not to methods, constructors, types, or properties, which are generally handled by the analyzer without throwing an exception.
Here is a class which exhibits this issue.
Note that the include file references a file called
docs.xml
, which is as follows for the purposes of this report:The text was updated successfully, but these errors were encountered: