“Treat all warnings as errors except…” in Visual Studio

You can add a WarningsNotAsErrors-tag in the project file.

<PropertyGroup>
    ...
    ...
    <WarningsNotAsErrors>618,1030,1701,1702</WarningsNotAsErrors>
</PropertyGroup>

Note: 612 and 618 are both warnings about Obsolete, don’t know the difference but the project i’m working on is reporting Obsolete with warning 618.

Leave a Comment