Skip to content

CA1416 doesn't work when Microsoft.CodeAnalysis.NetAnalyzers is referenced directly with EnableNETAnalyzers=false #53125

@amaltinsky

Description

@amaltinsky

When a project has a dependency on Microsoft.CodeAnalysis.NetAnalyzers v10.0.103 and EnableNETAnalyzers is set to false, CA1416 warnings aren't being triggered when they should (reproduction code).

This didn't use to be the case with Microsoft.CodeAnalysis.NetAnalyzers v8.0.0. In fact, adding a dependency on Microsoft.CodeAnalysis.NetAnalyzers v8.0.0 used to set EnableNETAnalyzers to false to prevent collisions between the SDK's built-in analyzers and the package-provided ones.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions