【发布时间】:2012-05-07 08:34:54
【问题描述】:
使用 Visual Studio 2010 中的内置代码分析,我在 aspx 文件的设计器文件的所有字段中都获得了 CA1051。
Warning 111
CA1051 : Microsoft.Design : Because field 'Product.PageTitle' is visible
outside of its declaring type, change its accessibility to private
and add a property, with the same accessibility as the field has
currently, to provide access to it.
Product.aspx.designer.cs 22
我不想删除其他文件的规则。
我不想手动编辑生成的设计器文件。
我能否以其他方式避免此消息,然后在错误列表中逐个字段地抑制消息?
【问题讨论】:
标签: asp.net .net visual-studio-2010 code-analysis fxcop