我似乎无法让Nant将我的网络解决方案复制到输出文件夹,例如测试服务器。即使构建成功,它也不会复制文件。
根据docs / p:WebProjectOutputDir应该这样做。
提前致谢。
<echo message="Compiling ${msbuild.workingdir}\${package.name}.sln - Copy to ${development.path}"/>
<exec program="msbuild.exe" basedir="${msbuild.path}" workingdir="${msbuild.workingdir}">
<arg value="/p:Configuration=Test" />
<arg value="/p:UseWPP_CopyWebApplication=True" />
<arg value="/noconsolelogger" />
<arg value="/v:d" />
<arg value="/logger:${lib.nant.path}\loggers\Rodemeyer.MsBuildToCCnet.dll"/>
<arg value="/t:rebuild;ResolveReferences;_CopyWebApplication"/>
<arg value="/p:OutDir=\\latchford\Drop\Club.Registration.DailyBuild\current\bin" />
<arg value="/p:WebProjectOutputDir=\\latchford\Drop\Club.Registration.DailyBuild\current\" />
<arg value="${package.name}.sln"/>
</exec>
<property name="msbuild.output.file" value="${msbuild.workingdir}/msbuild-output.xml"/>
<move if="${file::exists(msbuild.output.file)}" file="${msbuild.output.file}" todir="${log.dir}" failonerror="false" overwrite="true" />
答案 0 :(得分:3)
1. OutDir属性必须以尾部斜杠结尾:/ p:OutDir = .. \ current \ bin \
2.Parameter UseWPP_CopyWebApplication不需要只复制到您的输出中
3.似乎只有重建目标才能召唤
<exec program="msbuild.exe" basedir="${msbuild.path}" workingdir="${msbuild.workingdir}">
<arg value="/p:Configuration=Test" />
<arg value="/noconsolelogger" />
<arg value="/v:d" />
<arg value="/logger:${lib.nant.path}\loggers\Rodemeyer.MsBuildToCCnet.dll"/>
<arg value="/t:rebuild"/>
<arg value="/p:OutDir=\\latchford\Drop\Club.Registration.DailyBuild\current\bin\" />
<arg value="/p:WebProjectOutputDir=\\latchford\Drop\Club.Registration.DailyBuild\current\" />
<arg value="${package.name}.sln"/>
</exec>