What should I do if a code analyzer rule throws an exception (message AD0001)?

In the sample project, I receive the following notification message using a code analyzer:

exception image

I tried to disable the specified rule (CA1033), but the message is saved. Since there is no information about in which file this exception is generated, I do not know which file raises the exception.

Another thing I tried is to add a second instance of visual studio as a debugger, but it doesn't break when an exception is thrown.

Any ideas? Should I report a github analyzer project about this problem ?

Stacktrace NullReferenceException exceptions:

"Microsoft.AnalyzerPowerPack.CSharp.Design.CSharpInterfaceMethodsShouldBeCallableByChildTypesAnalyzer" lรถste eine Ausnahme des Typs "System.NullReferenceException" mit der Meldung "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." aus. 
Prjm.BackEnd        1   Analyzer "Microsoft.AnalyzerPowerPack.CSharp.Design.CSharpInterfaceMethodsShouldBeCallableByChildTypesAnalyzer" hat die folgende Ausnahme ausgelรถst:
"System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Microsoft.AnalyzerPowerPack.CSharp.Design.CSharpInterfaceMethodsShouldBeCallableByChildTypesAnalyzer.ShouldExcludeCodeBlock(SyntaxNode codeBlock)
   bei Microsoft.AnalyzerPowerPack.Design.InterfaceMethodsShouldBeCallableByChildTypesAnalyzer`1.AnalyzeCodeBlock(CodeBlockAnalysisContext context)
   bei Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass38_0.<ExecuteCodeBlockActions>b__0()
   bei Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze)".
+4
source share

Source: https://habr.com/ru/post/1615983/


All Articles