简体   繁体   English

如何在 Azure Devops Pipeline 托管代理中构建 Visual Studio 安装程序项目

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

I have a Visual Studio setup project.我有一个 Visual Studio 安装项目。 Normally I use the Microsoft Visual Studio Installer Projects extension, and run an MSBuild Exec task with command line using devenv.通常我使用Microsoft Visual Studio 安装程序项目扩展,并使用 devenv 通过命令行运行 MSBuild Exec 任务。 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 .但是,我希望使用VS2017 映像迁移到托管管道代理

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 "Debug" /Log "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\devenv.com" "D:\\a\\2\\s\\Source\\Build..\\WindowsFormsApp1\\WindowsFormsApp1.sln" /Build “调试”/项目“设置1”/ProjectConfig“调试”/日志

The operation could not be completed.操作无法完成。 The parameter is incorrect.参数不正确。

I tried adding the VSIX to my repo, and then issuing a command line install of the VSIX as such:我尝试将 VSIX 添加到我的存储库中,然后发出 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 "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

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):然而,这似乎阻塞了大约 10 分钟,然后失败并出现错误(我怀疑 UI 被阻塞,即使我使用 /quiet arg 来抑制 UI):

... exited with code -2146233088. ...退出代码 -2146233088。

Is there any way to build a Visual Studio installer project using a MS-hosted pipeline agent?有没有办法使用 MS 托管的管道代理构建 Visual Studio 安装程序项目?

How to build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent如何在 Azure Devops Pipeline 托管代理中构建 Visual Studio 安装程序项目

AFAIK, I am afraid we could not build Visual Studio Installer Project in Azure Devops Pipeline Hosted Agent at this moment. AFAIK,恐怕我们目前无法在 Azure Devops Pipeline托管代理中构建 Visual Studio 安装程序项目。

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.两周前我遇到了类似的问题,经过一段时间的调查,我开始尝试和你一样的想法,使用命令行安装 Microsoft Visual Studio Installer Projects 扩展。

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:实际上,即使在我提供/admin参数之后,也有一个 UI 窗口可以确认您是否要安装此扩展程序:

Check the options here .检查这里的选项。

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.所以,我想在 Azure DevOps 管道中执行命令行。 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.看来我们必须设置我们的私人代理。

Hope this helps.希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 azure devops 中运行 Visual Studio 构建 - How to run visual studio build in azure devops Visual Studio安装程序项目-构建平台配置为N.A ..如何更改? - Visual studio installer project - build platform configuration is N/A .. how to change? Azure Devops 管道未选择最新的 Visual Studio 版本 - Azure Devops pipeline is not picking latest visual studio version 尝试在 Azure DevOps 管道中使用 cmd 线和 devenv 构建带有 a.vdproj 文件的 a.msi 安装程序时遇到问题 - Trouble with trying to build a .msi installer with a .vdproj file in Azure DevOps pipeline with cmd line and devenv Visual Studio 安装程序项目 2017 - 不可恢复的构建错误 - Visual Studio Installer Project 2017 - Unrecoverable Build Error 是否可以通过 azure devops 获取 Visual Studio 构建文件夹名称? - Is it possible to get the visual studio build folder name over azure devops? 使用 Visual Studio 构建任务在 azure devops 中设置工作目录 - Set working directory in azure devops with Visual Studio build task Azure DevOps 2019 查看 Visual Studio 中的构建过程 - Azure DevOps 2019 view build process inside Visual Studio 如何从jenkins构建Visual Studio安装程序项目(.vdproj)以生成.exe和.msi文件? - How to build visual studio installer project (.vdproj) from jenkins to generate .exe and .msi files? Azure DevOps 项目现在出现在 Visual Studio 2019 中 - Azure DevOps Project Now Showing up in Visual Studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM