VSTS 在线建筑设置项目? [英] VSTS Online Building Setup Projects?

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

问题描述

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

我上传的代码很好,而且构建得很好,但我正在努力让它产生一个 MSI.我已经尝试在解决方案构建后引入命令行任务来运行 devenv.com,但我无法让它正常工作.关于获得一个设置项目来构建其 MSI 的任何想法?

谢谢!

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

工具:C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEdevenv参数:SolutionName.sln/Build $(BuildConfiguration)/Project SetupSetup.vdproj

编辑 2:

新命令行:

工具:C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.com参数:MySolution.sln/Build $(BuildConfiguration)/Project SetupSetup.vdproj

日志:

2017-10-04T17:58:48.7033117Z ##[command]"C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.com" MySolution.sln/Build release/Project SetupSetup.vdproj2017-10-04T17:59:12.1156461Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1196471Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.telemetry.dll2017-10-04T17:59:12.1206475Z microsoft.visualstudio.extensionmanager.implementation.dll2017-10-04T17:59:46.2231714Z2017-10-04T17:59:46.2231714Z Microsoft Visual Studio 2017 版本 15.0.26730.3.2017-10-04T17:59:46.2231714Z 版权所有 (C) Microsoft Corp. 保留所有权利.2017-10-04T17:59:46.2231714Z2017-10-04T17:59:46.2231714Z 迁移过程中发生了一些错误.有关更多信息,请参阅迁移报告:2017-10-04T17:59:46.2231714Z d:a1sUpgradeLog.htm2017-10-04T17:59:46.4634939Z ========== 构建:0 成功或最新,0 失败,0 跳过 ==========2017-10-04T17:59:48.5239469Z ##[部分]整理:运行 C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.com

编辑 3:

根据@Marina - MSFT 我已经尝试了

解决方案

你必须请按照此处的说明配置您的构建代理:

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.

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?

Thanks!

EDIT:

Here's the command line task I tried:

Tool: C:Program Files (x86)Microsoft Visual Studio 14.0Common7IDEdevenv
Arguments: SolutionName.sln /Build $(BuildConfiguration) /Project SetupSetup.vdproj

EDIT 2:

New command line:

Tool: C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.com
Arguments: MySolution.sln /Build $(BuildConfiguration) /Project SetupSetup.vdproj

Logs:

2017-10-04T17:58:48.7033117Z ##[command]"C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.com" MySolution.sln /Build release /Project SetupSetup.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:a1sUpgradeLog.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 Studio2017EnterpriseCommon7IDEdevenv.com

EDIT 3:

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.0Common7Tools..IDEdevenv.com
2017-10-04T20:38:15.4043950Z Now running (C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools..IDEdevenv.com) with Arguments ("d:a1sMySolution.sln" /Build "release|any cpu" /Project "d:a1sSetupSetup.vdproj" /Out "d:a1BuildInstaller_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:a1sSetup
elease
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).

Task config

解决方案

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.

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.

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天全站免登陆