如何禁用在VS2012 C#项目特定的警告? [英] How can I disable a specific warning for a C# project in VS2012?

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

问题描述

我想在我在VS2012 C#项目构建过程中产生的部分XML文档。当我检查的项目 - >生成的XML文档文件选项属性 - >,我得到一个建立缺乏文档的每个公共成员警告。由于我们编译警告视为错误,这会阻止构建。

I am trying to generate partial XML documentation during my build process for a C# project in VS2012. When I check the XML documentation file option in Project->Properties->Build, I get a build warning for each public member that lacks documentation. Since we compile with warnings as errors, this blocks the build.

这个问题表明越来越过去,这通过禁用某些警告,但我无法弄清楚如何做,在VS2012!这里的MSFT文件 只上升到VS2010,只盖VB。我如何在C#/ VS2012项目级别禁用这些警告?

This question suggests getting past this by disabling certain warnings, but I can't figure out how to do that in VS2012! The MSFT documentation here only goes up to VS2010 and only covers VB. How can I disable these warnings at the project level in C#/VS2012?

推荐答案

你得到的警告有一些(如CS2000),所以你需要做的是用鼠标右键单击该项目,转到构建标签,该警告添加到抑制警告文本框。你可以通过用逗号(例如CS2000,CS2001)分离随后禁止一条以上。

The warning you're getting has a number (e.g. CS2000), so what you need to do is right-click on the project, go to the Build tab, and add that warning to the Suppress warnings text box. You can subsequently suppress more than one by separating them with a comma (e.g. CS2000,CS2001).

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

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