11

In a sample project, I get the following notification message by the code analzyer:

image of the exception

I tried to disable the mentioned rule (CA1033) - but the message persists. As there is no information in which file this exception is created, I've no idea which file is causing the exception.

Another thing I tried is to attach a second visual studio instance as a debugger, but it doesn't break when the exception is triggered.

Any ideas? Should I report this issue to the analyzer github project?

Stacktrace of the NullReferenceException:

"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)".
ventiseis
  • 3,029
  • 11
  • 32
  • 49

0 Answers0