如何禁用整个解决方案的特定警告? [英] How to disable specific warnings for the entire solution?

查看:138
本文介绍了如何禁用整个解决方案的特定警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
全局禁止显示c#编译器警告

Possible Duplicate:
Globally suppress c# compiler warnings

不要在每个文件中添加以下行:

To not add to each file a line like:

#pragma warning disable 1573

推荐答案

所有编译选项均在项目级别上指定. MSBuild存在于解决方案级别之下.

All compilation options are specified on the project level. MSBuild exists below the level of solutions.

要针对每个项目执行此操作,请转到项目属性"中的构建"选项卡,然后在禁止警告"文本框中输入警告编号.

To do it for each project, go to the Build tab in Project Properties and enter the warning number in the Suppress Warnings textbox.

这篇关于如何禁用整个解决方案的特定警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆