我正在尝试为将由 Jenkins 构建的解决方案配置 .build 文件。解决方案可以正确构建,但 Jenkins 需要花费很长时间才能为其创建安装程序。这是当前使用的文件:
<?xml version="1.0"?>
<project name="SampleApp" default="Install" xmlns="http://nant.sf.net/schemas/nant.xsd" >
<property name="basename" value="SampleApp"/>
<property name ="jenkinshome" value ="C:\Program Files\Jenkins\jobs\" />
<property name="OutputPath" value="bin/Release"/>
<property name="Release" value="true"/>
<property name="SampleApp.exe.config" value="Release" />
<property name="SolutionFileName" value = "SampleApp.sln" />
<property name="TargetFramework" value="${framework::get-target-framework()}" />
<target name="clean">
<delete>
<fileset>
<include name="${OutputPath}/${basename}.exe"/>
<include name="${OutputPath}/${basename}.pdb"/>
</fileset>
</delete>
</target>
<target name="build" >
<mkdir dir="${OutputPath}" />
<echo message= "${framework::get-assembly-directory(TargetFramework)}" />
<exec program="C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe"
commandline=''
workingdir="." />
</target>
<target name ="Install" depends="build">
<exec program="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe">
<arg value ="C:\Program Files\Jenkins\jobs\Legacy Data Adapter\workspace\SampleApp\SampleApp.vdproj /rebuild Release">
</arg>
</exec>
</target>
</project>
我是 Jenkins 和 CI 的整个概念的新手。感谢任何帮助/建议。