zoukankan      html  css  js  c++  java
  • NAnt学习笔记(1) NAnt的配置文件结构和一个简单的NAnt例子

    NAnt运行自动构建依据的是xml格式的.build文件。

    一个完整的build文件由一个project和多个target组成。每个target有可以包含多个task。

    下面是一个编译Hello World项目的NAnt配置文件:

       1 <?xml version="1.0"?>
     2     <project name="Hello World" default="build" basedir=".">
     3         <description>The Hello World of build files.</description>
     4         <property name="debug" value="true" overwrite="false" />
     5         <target name="clean" description="remove all generated files">
     6             <delete file="HelloWorld.exe" failonerror="false" />
     7             <delete file="HelloWorld.pdb" failonerror="false" />
     8         </target>
     9         <target name="build" description="compiles the source code">
    10             <csc target="exe" output="HelloWorld.exe" debug="${debug}">
    11                 <sources>
    12                     <includes name="HelloWorld.cs" />
    13                 </sources>
    14             </csc>
    15         </target>
    16     </project>
     
    这个例子中有2个target, 第一个target是clean, 删除上次编译生成的文件,第二个是build, 生成新的文件。
  • 相关阅读:
    yii required 字段去除*号
    shtml用include加载文件,apache开启SSI,及shtml压缩
    门户站点用html或shtml文件格式的原因
    Apache配置shtml
    数据库迁移工具
    SQL SERVER2005 级联删除
    MySql级联删除和更新
    js只允许输入数字和小数点
    表格中的数据为空时,td的边框不显示
    MYSQL: Cannot delete or update a parent row: a foreign key constraint fails
  • 原文地址:https://www.cnblogs.com/JustRun1983/p/2465657.html
Copyright © 2011-2022 走看看