使用 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
我不想删除其他文件的规则。
我不想手动编辑生成的设计器文件。
我可以以某种方式避免此消息,然后在错误列表中逐个字段地抑制消息吗?