【发布时间】:2011-10-21 18:45:44
【问题描述】:
我被分配了通过 NAnt 构建 MSI 的任务。如果我“必须”的话,我会使用 NAntContrib 或 WiX,但是给我这张票的时间并没有给我研究新构建技术的奢侈。这是我第一次与 NAnt 合作。
我们目前拥有的解决方案是 80 个项目、6 个服务(带有自己的 MSI 安装项目)和少数网站。
构建脚本首先构建解决方案,然后开始将所有构建的库、文件、zip、配置复制到它们的特定位置,以便直接进行部署。唯一的问题是它没有构建任何 MSI 文件。
构建框上安装了 Visual Studio。通过快速浏览网络,我看到如果您安装了 VS,则运行 deven.com 可以构建 MSI 文件...
正在构建的解决方案包含服务的安装项目,但未创建任何 MSI。我必须传递一个特定的设置/命令行参数来完成这项工作吗?
构建解决方案的 XML 如下。
$builtype 是“/build”
<target name="BuildOnly" depends="ConfigureBuild">
<if test="${property::exists('Distribution') and Distribution == 'True'}" >
<call target="ConfigureBuild.Release"/>
</if>
<call target="StopServices"/>
<call target="CleanSUOFiles"/>
<!--<call target="BuildEnterpriseLibrary" />-->
<property name="build.dir" value="${directory::get-current-directory()}"/>
<echo message="######### ${buildtype} ${StandardProjectTarget}"/>
<exec program="${deven.com}" workingdir="${build.dir}" failonerror="true" commandline=""BC_HM.sln" ${buildtype} ${StandardProjectTarget}"/>
<call target="BuildSchematronFiles"/>
</target>
谢谢。
【问题讨论】: