自动复制指定文件到指定目录中的NANT脚本

一段自动复制指定文件到指定目录中的NANT脚本build.build,这样就不用担心复制文件会出错了。如下



1 <?xml version="1.0" encoding="gb2312" ?>

2 <project name="MyTest" default="run">
3     <property name="basename" value="WebSite"/>
4     <property name="debug" value="true"/>
5     <property name="base.dir" value="源文件来" />
6     <property name="deploy.dir" value="目的文件夹" />
7     <property name="FxCop.dir" value="http://www.cnblogs.com/../deploy" /> 
8     <target name="clean">
9     
10     </target>
11     <target name="deploy" depends="clean">    
12     <!--********** 将projectA相关的dll拷贝到各个站点的bin目录下 Begin    **********-->
13     <copy todir="${deploy.dir}/WebSiteA/bin">
14         <fileset basedir="${base.dir}/bin/Release/">
15                 <include name="*.dll" />
16             </fileset>
17     </copy>
18     <copy todir="${deploy.dir}/WebSiteB/bin">
19         <fileset basedir="${base.dir}/bin/Release/">
20                 <include name="*.dll" />
21             </fileset>
22     </copy>
23     <copy todir="${deploy.dir}/WebSiteC/bin">
24         <fileset basedir="${base.dir}/Release/">
25                 <include name="*.dll" />
26             </fileset>
27     </copy>
28     <copy todir="${deploy.dir}/WebSiteD/bin">
29         <fileset basedir="${base.dir}/bin/Release/">
30                 <include name="*.dll" />
31             </fileset>
32     </copy>
33         <copy todir="${deploy.dir}/WebSiteE/bin">
34         <fileset basedir="${base.dir}/bin/Release/">
35                 <include name="*.dll" />
36             </fileset>
37     </copy>
38     <!--**********将projectA相关的dll拷贝到各个站点的bin目录下 End    **********-->    
39     </target>
40 <target name="run" depends="fxcop">
41     </target>
42     <target name="fxcop" depends="deploy">
43         
44     </target>
45 </project>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值