开发者

In NAnt, using the CSC task, how do I suppress compiler warnings?

开发者 https://www.devze.com 2022-12-21 11:33 出处:网络
I see the CSC task in NAnt has a nowarn attribute, but apparently this is depre开发者_如何学JAVAcated. How can I suppress warnings then? Use the nowarn element instead. For example:

I see the CSC task in NAnt has a nowarn attribute, but apparently this is depre开发者_如何学JAVAcated. How can I suppress warnings then?


Use the nowarn element instead. For example:

<csc output="${build.dir.legacy}Library.dll"
 target="library"
 verbose="${debug}">

  <sources basedir="${source.legacy.patterns.dir}">
    <include name="**.cs"/>
  </sources>

  <nowarn>
    <warning number="0162,0169,0168,0219,0414,0649,0114,0105"></warning>
  </nowarn>

</csc>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号