1
我有一个构建脚本运行成功,但我很难在aspnet_compiler完成后运行任何东西。我想使用robocopy将项目复制到另一个文件夹。如果我将复制任务放在编译器的上面(如下所示),我会将消息传给控制台,但如果在编译之后放置它,则不会看到。我错过了什么吗?我是否需要检查编译器的返回代码以在完成后调用任务?NAnt和ASP.NET编译器
<target name="copy" depends="init">
<echo message="This is my message for robocopy..."/>
</target>
<target name="compile" depends="copy">
<exec program="${msbuild.exe}"
commandline='MySolution.sln /p:Configuration=${Configuration};OutDir="${build.dir}\\"' />
</target>
<target name="precompile-web" depends="compile">
<exec program="${aspnet_compiler.exe}"
commandline='-v /MyProj-p "${build.dir}"\_PublishedWebsites\MyProj.Web'
/>
是的,当/如果我搬到低于预编译的Web副本任务,我改变取决于=“预编译的Web”和编译任务依赖于“初始化”。
是的,我想完成你所设想的第二套命令。问题在于我让他们开火的顺序。谢谢。 – 2010-02-22 15:01:32