如何在Azure Devops Pipeline托管代理中构建Visual Studio Installer项目 [英] How to build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent

查看:119
本文介绍了如何在Azure Devops Pipeline托管代理中构建Visual Studio Installer项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Visual Studio安装项目.通常,我使用 Microsoft Visual Studio安装程序项目扩展,并运行MSBuild Exec使用devenv的命令行执行任务.这适用于我的开发箱和现有的构建机器.但是,我希望迁移到托管管道代理使用 VS2017图片.

I have a Visual Studio setup project. Normally I use the Microsoft Visual Studio Installer Projects extension, and run an MSBuild Exec task with command line using devenv. This works on my dev box and my existing build machine. However I'm looking to migrate to a hosted pipeline agent using the VS2017 image.

我希望可能已经安装了安装程序扩展,所以我尝试构建并遇到错误:

I was hoping the installer extension might already be installed, so I tried my build and got an error:

"C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ devenv.com" "D:\ a \ 2 \ s \ Source \ Build .. \ WindowsFormsApp1 \ WindowsFormsApp1.sln"/Build"Debug"/Project"Setup1";/ProjectConfig调试"/日志

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com" "D:\a\2\s\Source\Build..\WindowsFormsApp1\WindowsFormsApp1.sln" /Build "Debug" /Project "Setup1" /ProjectConfig "Debug" /Log

操作无法完成.参数不正确.

The operation could not be completed. The parameter is incorrect.

我尝试将VSIX添加到我的仓库中,然后像这样发布VSIX的命令行安装:

I tried adding the VSIX to my repo, and then issuing a command line install of the VSIX as such:

"C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ VSIXInstaller.exe"/a/quiet/log:MyTestApp.log D:\ a \ 2 \ s \ Source \ Build \ InstallerProjects.vsix

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" /a /quiet /log:MyTestApp.log D:\a\2\s\Source\Build\InstallerProjects.vsix

但是这似乎会阻塞约10分钟,然后失败并显示错误(即使我使用/quiet arg来抑制UI,我也怀疑UI正在阻塞):

However that seems to block for about 10 minutes, and then fails with an error (I suspect the UI is blocking even though I used the /quiet arg to suppress the UI):

...退出,代码为-2146233088.

... exited with code -2146233088.

是否可以使用MS托管的管道代理来构建Visual Studio安装程序项目?

Is there any way to build a Visual Studio installer project using a MS-hosted pipeline agent?

推荐答案

如何在Azure Devops Pipeline托管代理中构建Visual Studio Installer项目

How to build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent

AFAIK,目前恐怕我们无法在Azure Devops Pipeline 托管代理中构建Visual Studio Installer项目.

AFAIK, I am afraid we could not build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent at this moment.

我遇到了类似的问题,两周前,经过一段时间的调查,我开始尝试使用与您相同的想法,使用命令行安装Microsoft Visual Studio Installer项目扩展.

I encountered a similar issue two weeks ago, after a period of investigation, I started to try the same idea as you, using command line to install the Microsoft Visual Studio Installer Projects extension.

但是,我遇到了超时问题.我无法在主机代理上安装该扩展.为了测试其原因,我使用相同的命令lien在另一台本地计算机上安装了该扩展名.确实,即使我提供了/admin参数,也有一个UI窗口确认您是否要安装此扩展程序:

However, I got the timeout issue. I could not install that extension on the hosted agent. To test the reason for this, I use the same command lien to installed that extension on another local machine. Indeed, there is a UI window to confirm if you want to install this extension, even after I give the /admin parameter:

此处中检查选项.

然后,我尝试使用管理员打开命令行并执行相同的命令行,它可以成功安装该扩展.因此,我想在Azure DevOps管道中执行命令行.但是没有成功.因为我们无法使用命令行脚本任务以管理员身份执行命令行脚本.

Then I try to open the command line with Administrator and execute the same command line, it can successfully install that extension. So, I want to execute the command line in the Azure DevOps pipeline. But no success. Because we could not execute command line script as admin using Command Line Script task.

似乎我们必须设置我们的私人代理人.

It seems we have to set our private agent.

希望这会有所帮助.

这篇关于如何在Azure Devops Pipeline托管代理中构建Visual Studio Installer项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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