我有一个构建过程在 NAnt 中,类似于以下结构(很多已被缩写)。我对可以从我的 NAnt 脚本中放入 Workflow 的内容以及应该转换为 MSBuild(或不转换)的内容有些困惑。NAnt 脚本中的各种目标将设置属性、复制文件、删除文件、调用外部进程(例如编译 VB6 项目)。任何将其移植到工作流的提示将不胜感激。如果您有任何问题,请告诉我。
<?xml ... >
<project ...>
<!-- Get and combine paths -->
<properties name="" value=""/>
<properties name="" value=""/>
<properties name="" value=""/>
.
.
.
.
<target name="Main">
<!--Set Log Folder Name to include date and time.
<mkdir dir="${LogDir}"/>
<call target="DeleteTicketsFile"/>
<call target="GetTickets"/>
<call target="WriteTicketsToFile"/>
<call target="WriteProperties"/>
<call target="DeleteFolders" failonerror="true"/>
<call target="GetLatest" failonerror="true"/>
<call target="BuildDOTNETSolution" failonerror="true"/>
<call target="BuildVB6Projects" failonerror="true"/>
.
.
.
<target name="BuildDOTNETSolution">
<property name="ProjectName" value="Localcache" />
<echo message="VCVarsAllBatFile = ${VCVarsAllBatFile}"/>
<exec program="${VCVarsAllBatFile}"/>
<property name="dotnetSlnFile" value="${path::combine(ProductDir, 'dot.net.sln')}"/>
<property name="dotnetOutFile" value="${path::combine(LogDir, 'dotnet.out.txt')}"/>
<echo message="dotnetSlnFile = ${dotnetSlnFile}"/>
<echo message="dotnetOutFile = ${dotnetOutFile}"/>
<delete file="${dotnetOutFile}" if="${file::exists(dotnetOutFile)}" failonerror="false"/>
<!-- Build .NET solution in Release mode -->
<exec program="${DevenvExe}">
<environment>
<variable name="COMSUPPORT" value="N"/>
<variable name="COPYEXECENV" value="N"/>
</environment>
<arg value='"${dotnetSlnFile}"'/>
<arg value='/Rebuild "Release|Any CPU"'/>
<arg value='/Out "${dotnetOutFile}"'/>
</exec>
</target>
</project>