FxCop代码分析ASP.NET中发现的__DataBind__control

发布于 2024-08-27 12:44:51 字数 612 浏览 4 评论 0原文

我在网站项目中使用 Visual Studio 2008 Team Suite,并希望使用内置的代码分析功能 (FxCop)。在检查命名规则时,出现以下错误:

CA1709:Microsoft.Naming:Korrigieren Sie die Schreibweise von“control”im Membernamen“'module_readPost_ascx.__DataBinding__control15(Object,EventArgs)'”

含义:我必须检查成员名称“'module_readPost_ascx.__DataBinding__control15(Object, EventArgs)'”中“control”一词的拼写

不幸的是,整个项目中没有名为 __DataBinding__control15(Object, EventArgs) 的方法。我想这段代码是在编译时生成的,因此 FxCop 在检查编译的程序集时可以找到它。

它在项目中被发现了大约 150 次,所以我想告诉 FxCop 忽略此代码或更改我的代码以不会导致此“异常”。

“不检查规则 Microsoft.Naming CA1709”不是一个选项;)

非常感谢您的反馈。

I use Visual Studio 2008 Team Suite in a website project and want to use the built-in code analysis feature (FxCop). When checking the naming rules, I get this error:

CA1709: Microsoft.Naming: Korrigieren Sie die Schreibweise von "control" im Membernamen "'module_readPost_ascx.__DataBinding__control15(Object, EventArgs)'"

meaning: I have to check the spelling of the word "control" in member name "'module_readPost_ascx.__DataBinding__control15(Object, EventArgs)'"

Unfortunatly there is no method called __DataBinding__control15(Object, EventArgs) in the whole project. I suppose this code is generated at compile time, so FxCop can find it as it is inspecting the compiled assemblies.

It is found about 150 times in the project, so I want to tell FxCop to ignore this code or change my code to not causing this "exception".

"Not checking rule Microsoft.Naming CA1709" is not an option ;)

Thanks a lot for your feedback.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回梦 2024-09-03 12:44:51

不幸的是,根据 Microsoft Connect 的说法,这是 Visual Studio 中的一个(已知)错误。 Microsoft 提供的解决方法:“作为解决方法,您可以在全局抑制文件中对此警告应用抑制。”

Unfortunatly, according to Microsoft Connect this a (known) bug in Visual Studio. Workaround provided by Microsoft: "As a workaround, you can apply a suppression in the global suppression file for this warning."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文