Disabling/Fixing Code Analysis warnings from .Designer.cs files

后端 未结 4 1404
忘了有多久
忘了有多久 2021-02-13 14:44

I am using DataVisualization.Charting.Chart extensively, and for the most part it is working. However, I\'ve been running Code Analysis frequently, and have all my

4条回答
  •  清酒与你
    2021-02-13 15:34

    Have you tried toggling the "Suppress results from generated code" property value to true in the Code Analysis property page for your project(s)? This option is the standard mechanism for ignoring problems in generated code.

    That said, generated code is code that will be executed, so ignoring its violations is not necessarily a great idea. Given the "noisiness" of CA2000, you may wish to consider disabling the rule instead.

提交回复
热议问题