Skip to content

Code analysis warnings not treated as errors despite property #49882

@AArnott

Description

@AArnott

Version Used:
dotnet SDK 5.0.100

Steps to Reproduce:

On a netstandard2.0 project, introduce a code analysis warning. Build with properties to treat warnings as errors.,

Minimal repro project: cabug.zip

Expected Behavior:

Build fails with error.
I expect just TreatWarningsAsErrors: true should be sufficient, but just to be sure I also set CodeAnalysisTreatWarningsAsErrors: true based on this documentation.

Actual Behavior:

Build succeeds after emitting a warning.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions