且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

"所有警告视为错误,除非..."在Visual Studio中

更新时间:2021-07-03 00:52:18

您可以添加 WarningsNotAsErrors -tag在项目文件。

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

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

请注意: 612 618 即将过时的,不知道其中的差别,但这个项目我都警告M工作报告是用过时警告618。

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.