Globally suppress c# compiler warnings

后端 未结 3 1338
小鲜肉
小鲜肉 2020-12-06 09:45

In my app I have a fair number of entities which have fields which are getting their values set via reflection. (In this case NHibernate is setting them). I\'d like to get r

相关标签:
3条回答
  • 2020-12-06 10:03

    Use the C# commandline option /nowarn http://msdn.microsoft.com/en-us/library/7f28x9z3(VS.80).aspx

    To do this within visual studio goto Project properties->Build->(Errors and warnings) Suppress Warnings and then specify a comma separated list of warnings which need to be suppressed.

    0 讨论(0)
  • 2020-12-06 10:13

    Open the project properties, on the build tab, enter warning IDs you want to surpress in the Suppress warnings: box.

    0 讨论(0)
  • 2020-12-06 10:13

    The VC++ XML tag for this is <DisableSpecificWarnings/> with a semi-colon separated list of numeric IDs. This doesn't appear to be documented anywhere that I can see but FYI.

    0 讨论(0)
提交回复
热议问题