代码之家  ›  专栏  ›  技术社区  ›  willem

在nant中,使用csc任务,如何取消编译器警告?

  •  0
  • willem  · 技术社区  · 15 年前

    我看到南特的CSC任务有一个 诺瓦恩 属性,但显然这已被弃用。那么,我如何抑制警告呢?

    1 回复  |  直到 15 年前
        1
  •  0
  •   willem    15 年前

    使用诺瓦恩 要素 相反。例如:

    <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>