此Target用于清除NAnt生成的文件。

首先,需要添加一个property:

< property  name ="bin_dir"  value ="bin"   />

用于定义需要删除的目录。

然后,添加一个Target:
    <target name="clean">
        
<delete dir="${bin_dir}" />
    
</target>

这个Target仅仅删除了生成的bin目录,项目中可能还会生成doc等目录。若需要删除这些目录,只需要再定义property和delete指令即可。

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-11-04
  • 2022-01-07
相关资源
相似解决方案