使用TFS构建模板+高级安装程序

时间:2016-04-08 08:37:39

标签: tfs msbuild windows-installer

我试图让我们的Windows窗体项目使用Advanced Installer生成一个MSI安装程序,在我自己的机器上本地执行该操作非常简单。我为项目的解决方案创建了一个新的Advanced Installer项目。

但是我现在试图让TFS在我们的构建服务器上触发MSI的构建,我不知道它出了什么问题。

我们将TFS与Octopus一起用于持续集成设置,项目可以使用我们的Build模板在服务器上成功构建。 完成后的TFS构建将由Octopack插件打包到nuget包中,然后被复制到适当的文件夹:CD,DEV,TEST或UAT。

我已在构建服务器的默认目录中安装了Advanced Installer。 因此,使用现有的构建模板作为起点: 在流程部分,我修改了“要构建的项目”。属性包括新的Advanced Installer MSI项目(.aiproj文件)。

然后我在Build Defaults部分中设置了一个构建输出位置,这样我就可以看到正在编译的文件。

结果是第一个项目构建正常并被复制到构建输出位置,并带有日志文件夹。在活动日志文件中,我收到以下错误:

Try to Compile the Project00:00:00

Compile the Project00:00:00

Convert Server Path to Local Path00:00:00

InputsInput: $/Care/Code/CareSafe Desktop/CareSafe-R4/careSafe.MSI/careSafe.MSI.aiproj
Workspace: 70_4_cda-mstfs1;USER\cda-service

OutputsResult: C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Sources\careSafe.MSI\careSafe.MSI.aiproj


If Build Outputs are Solution-Specific00:00:00

InputsCondition: True


Update Output Directory00:00:00


Set Solution-Specific Output Directory00:00:00

InputsValue: C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Binaries\careSafe.MSI

OutputsTo: C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Binaries\careSafe.MSI


If Output Directory Exists00:00:00

InputsCondition: False


Run MSBuild for Project00:00:00

InputsDeployOnBuild: False
NodeReuse: False
GenerateVSPropsFile: True
ToolPath: 
Verbosity: Diagnostic
ToolPlatform: X86
LogFileDropLocation: \\cda-mstfs1\tfsBuildDropLocation\CareSafe Desktop R4 + MSI\CareSafe Desktop R4 + MSI_20160408.15\logs
Targets: 
RunCodeAnalysis: Never
CommandLineArguments: /p:SkipInvalidConfigurations=true /p:RunOctoPack=true /t:Build /p:OctoPackPublishPackageToFileShare=\\cda-deployment1\deployment$. 
Platform: x86
LogFile: 
AllowUntrustedCertificate: False
DeployIisAppPath: 
MSDeployPublishMethod: 
ToolVersion: 
LogWarnings: True
CreatePackageOnPublish: False
MaxProcesses: 0
LogProjectNodes: True
MSDeployServiceUrl: 
ResponseFile: 
UserName: 
Project: C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Sources\careSafe.MSI\careSafe.MSI.aiproj
DeployTarget: 
Password: 
Configuration: Debug
OutDir: C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Binaries\careSafe.MSI
IgnoreDuplicateProjects: False
TargetsNotLogged: String[] Array
AdditionalVCOverrides: 


C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /nologo /noconsolelogger "C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Sources\careSafe.MSI\careSafe.MSI.aiproj" /nr:False /fl /flp:"logfile=C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Sources\careSafe.MSI\careSafe.MSI.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true /p:RunOctoPack=true /t:Build /p:OctoPackPublishPackageToFileShare=\\cda-deployment1\deployment$. /m /p:OutDir="C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Binaries\careSafe.MSI\\" /p:Configuration="Debug" /p:Platform="x86" /p:RunCodeAnalysis="False" /p:VCBuildOverride="C:\Builds\4\Care\CareSafe Desktop R4 + MSI\Sources\careSafe.MSI\careSafe.MSI.aiproj.x86.Debug.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;BuildUri=vstfs:///Build/Build/8528;IgnoreDuplicateProjects=False;InformationNodeId=1569;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;LogProjectNodes=True;LogWarnings=True;TFSUrl=http://cda-mstfs1:8080/tfs/cordia;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;" /p:BuildId="c2d6b87e-a93b-4850-ab07-405fa6f74042,vstfs:///Build/Build/8528" /p:BuildLabel="CareSafe Desktop R4 + MSI_20160408.15" /p:BuildTimestamp="Fri, 08 Apr 2016 13:56:06 GMT" /p:BuildSourceVersion="LCareSafe Desktop R4 + MSI_20160408.15@$/Care" /p:BuildDefinition="CareSafe Desktop R4 + MSI"


Handle Exception00:00:00


Set CompilationStatus to Failed00:00:00

InputsLabelName: 
SourceGetVersion: 
KeepForever: False
DropLocation: 
Status: None
LogLocation: 
BuildNumber: 
Quality: 
TestStatus: Unknown
CompilationStatus: Failed


If CreateWorkItem00:00:00

InputsCondition: False


Mark Requests for Retry00:00:00

InputsBehavior: DoNotBatch
Requests: IQueuedBuild[] Array
Force: False


Rethrow the exception so the build will stop

1 个答案:

答案 0 :(得分:2)

我也遇到了这个问题,我通过显式使用32位版本的MSBuild来修复它。 TFS的高级安装程序扩展与MSBuild x64不兼容。因此,您应确保编辑TFS构建定义,以将MSBuild Platform参数设置为" x86"如果你还没有这样做。

我希望这会有所帮助。