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, 生成新的文件。
  • 相关阅读:
    python基础知识第三篇(列表)
    python基础知识第二篇(字符串)
    python基础知识第一篇(认识Python)
    tomacat环境搭建
    Python的内存管理机制
    selenium定位方法
    python+selenium xpath定位
    django--创建及配置项目app
    django--cookies和session
    django--orm--012
  • 原文地址:https://www.cnblogs.com/JustRun1983/p/2465657.html
Copyright © 2011-2022 走看看