VSTS在线建筑安装项目? [英] VSTS Online Building Setup Projects?

查看:57
本文介绍了VSTS在线建筑安装项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有安装项目的.NET Console应用程序,我试图移植到VSTS Online(visualstudio.com)以利用源代码控制并添加自动构建/部署.

I have a .NET Console app with a setup project I am trying to port to VSTS Online (visualstudio.com) to make use of the source control and well as adding automated build/deploy.

我已经上传了很好的代码,它的构建很棒,但是正在努力使其产生MSI.我尝试在解决方案构建后引入命令行任务来运行devenv.com,但我还无法完全正常工作.关于获取设置项目以构建其MSI的任何想法?

I've got the code uploaded just fine and it builds great, but am struggling with getting it to produce a MSI. I've tried introducing a command line task after the solution build to run devenv.com but I can't quite get that to work. Any thoughts on getting a setup project to build its MSI?

谢谢!

这是我尝试的命令行任务:

Here's the command line task I tried:

Tool: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv
Arguments: SolutionName.sln /Build $(BuildConfiguration) /Project Setup\Setup.vdproj

新命令行:

Tool: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com
Arguments: MySolution.sln /Build $(BuildConfiguration) /Project Setup\Setup.vdproj

日志:

2017-10-04T17:58:48.7033117Z ##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com" MySolution.sln /Build release /Project Setup\Setup.vdproj
2017-10-04T17:59:12.1156461Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll
2017-10-04T17:59:12.1206475Z microsoft.visualstudio.extensionmanager.implementation.dll
2017-10-04T17:59:46.2231714Z 
2017-10-04T17:59:46.2231714Z Microsoft Visual Studio 2017 Version 15.0.26730.3.
2017-10-04T17:59:46.2231714Z Copyright (C) Microsoft Corp. All rights reserved.
2017-10-04T17:59:46.2231714Z 
2017-10-04T17:59:46.2231714Z Some errors occurred during migration. For more information, see the migration report:
2017-10-04T17:59:46.2231714Z d:\a\1\s\UpgradeLog.htm
2017-10-04T17:59:46.4634939Z ========== Build: 0 succeeded or up-to-date, 0 failed, 0 skipped ==========
2017-10-04T17:59:48.5239469Z ##[section]Finishing: Run C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com

根据@Marina-MSFT,我已经尝试过构建VS安装程序,但对我来说却并不奏效.任务成功竞争,但似乎没有实际生成MSI,因为工件下降中没有任何内容.这是该任务的日志:

As per @Marina - MSFT I have tried the Build VS Installer, but it didn't quite work for me. The task competed successfully but it appears the MSI is never actually generated as nothing appears in the artifact drop. Here are the logs from the task:

2017-10-04T20:38:12.1314337Z ##[section]Starting: Create .msi file(s) from VS Installer project(s).
2017-10-04T20:38:12.1314337Z ==============================================================================
2017-10-04T20:38:12.1314337Z Task : DutchWorkz - Build VS Installer(s)
2017-10-04T20:38:12.1314337Z Description : Build .msi file(s) from VS Installer project(s).
2017-10-04T20:38:12.1314337Z Version : 1.2.4
2017-10-04T20:38:12.1314337Z Author : DutchWorkz B.V.
2017-10-04T20:38:12.1324342Z Help : <b>BuildVsInstaller v1.2.4</b>, DutchWorkz B.V. (Robin Paardekam)<br/><br/>Visual Studio Installer projects are not supported by MSBUILD, so a regular build will not generate your installer files (.msi). Use this build-task to build the .msi file(s) for your project by running devenv on the buildagent directly. <br/><br/><b>Dependencies:</b><br/>Dep1: when using VisualStudio 2017, this task will only function properly if you installed it in the default C:\Program Files (x86)\ location.
2017-10-04T20:38:12.1324342Z ==============================================================================
2017-10-04T20:38:15.3883721Z DEBUG: Aggregated: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\IDE\devenv.com
2017-10-04T20:38:15.4043950Z Now running (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\..\IDE\devenv.com) with Arguments ("d:\a\1\s\MySolution.sln" /Build "release|any cpu" /Project "d:\a\1\s\Setup\Setup.vdproj" /Out "d:\a\1\b\BuildInstaller_Log_20171004203815.txt")
2017-10-04T20:39:39.8930682Z Done running DevEnv process. Success = True.
2017-10-04T20:39:39.8950669Z The single MSI should be located here: d:\a\1\s\Setup\release\
2017-10-04T20:39:40.0450669Z ##[warning]No .MSI files were found, please check your build-configuration. If this is expected, you might consider to use the default Visual Studio Build task instead of this custom Installer task.
2017-10-04T20:39:40.0560673Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).

任务配置

推荐答案

您必须

You have to configure your own build agent to run the build since Visual Studio Installer Projects extension is not installed on the Hosted & Hosted 2017 Agent.

确保在自己的构建代理上安装了VS Installer项目扩展,然后可以使用带有"devenv"的命令行任务或使用"Build VS Installer"任务来构建安装项目.

Make sure the VS Installer Projects extension is installed on your own build agent and then you can build the setup project either use command line task with "devenv" or use the "Build VS Installer" task.

如果您收到"8000000A"错误,如下所示: 请按照此处的说明配置您的构建代理:解决方案:验证时发生错误. HRESULT ='8000000A'.

And if you get the "8000000A" error like following: Please following the instruction here to configure your build agent: Solution: An error occurred while validating. HRESULT = '8000000A'.

然后,您应该能够成功构建安装项目:

Then you should be able to build the setup project successfully:

这篇关于VSTS在线建筑安装项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆