Search code examples
visual-studioroslyn-code-analysis

VS 2019 - seeing many warnings AD0001 from Microsoft.CodeAnalysis.CSharp.Analyzers


I get this exact warning many time in the Error List pane in VS 2019 (v16.4.2).

How can i resolve the warnings ?

AD0001 Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.FixAnalyzers.CSharpFixerWithFixAllAnalyzer' threw an exception of type 'System.TypeInitializationException

Solution

  • its resolved,

    An old version of the package was pulled in by an indirect reference.

    adding the package as a direct dependency forces the use of the new version - resolving the warning.

    link to the github issue i opened