我有一个nant构建脚本,它指定各种Visual Studio解决方案文件的编译。
<target name="compile.solution1" description="Compiles solution 1">
<msbuild project="${src.dir}\Solution1.sln" verbosity="${build.verbosity}">
<property name="Configuration" value="${build.config}" />
<property name="OutputPath" value="${build.fullpath}/${prefix.sol1}" />
<property name="ReferencePath" value="${assembly.dir}" />
</msbuild>
</target>
我在targets compile.solution1、compile.solution2、compile.solution3…compile.solution7中指定了多个解决方案
我还有另一个目标,指定要编译整个解决方案:
<target name="compile" depends="compile.solution1, compile.solution2,
compile.solution3, compile.solution4, compile.solution5, compile.solution6,
compile.solution7" description="Compiles all targets" />
当我计算执行目标“compile”所需的时间,并将其与执行每个compile.solutionx目标所需的任务时间之和进行比较时,我发现“compile”目标需要30秒的时间。
我不明白为什么会这样?在我看来,“compile”目标应该充当for循环,它与单独执行每个目标之间的差异应该是最小的。
在处理单个目标中定义的多个解决方案时,是否有人知道在nant中后台是否有更多解决方案?
对不起,这个问题的标题太可怕了……我只是不知道该怎么表达。