如何使用Azure中的DevOps管道正确地构建MSI安装项目?

问题描述 投票:4回答:1

我一直在拉我的头发,在过去几天,试图找出如何建立一个CI / CD过程只是建立一个简单的WPF解决方案,使用Azure的DevOps的管道创建MSI安装文件(“神器”)。我一直在使用Build VS Installer做到这一点尝试。我的主要问题是,我不知道究竟我做错了还是我缺少什么步骤,我无法找到任何地方这样明确的指示。

以下是我已经试过:

  1. 使用托管代理2017年池和基本.NET桌面模板。问题: 从VS安装项目(S)作为最后一个任务或发布神器)之前创建的.msi文件(S):

2018-11-28T22:57:56.3186071Z DEBUG: Aggregated: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com 2018-11-28T22:57:56.3211382Z Now running (C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com) with Arguments ("D:\a\1\s" /Build "release|any cpu" /Out "D:\a\1\b\BuildInstaller_Log_20181128225756.txt") 2018-11-28T22:58:54.0015320Z Done running DevEnv process. Success = True. 2018-11-28T22:58:54.1169279Z ##[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. 2018-11-28T22:58:54.1434410Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).

enter image description here

  1. 创建我自己的生成代理所概述in the documentation。我的Visual Studio 2017年社区与该服务器上安装的VS Installer Projects extension。我跟着从this相关答案的步骤。结果:

2018-11-29T17:46:03.9813075Z DEBUG: Aggregated: System.Object[]\devenv.com 2018-11-29T17:46:04.4346060Z ##[error]Cannot retrieve the dynamic parameters for the cmdlet. The specified wildcard character pattern is not valid: System.Object[] 2018-11-29T17:46:04.4716416Z ##[section]Finishing: Create .msi file(s) from VS Installer project(s).

enter image description here

我也试过devenv的从市场上,而不是DutchWorkz一个构建,仍然无法得到.msi文件。可有人请告诉我如何实现这个简单的目标一些明确的步骤是什么?

c# azure-devops azure-pipelines setup-project
1个回答
2
投票

我能找出为什么我得到下面的特定错误消息,并且希望的情况下,分享它可以帮助任何人出来的未来。

DEBUG:

汇总:System.Object[]\devenv.com [错误]无法检索该cmdlet的动态参数。指定通配符模式是无效的:System.Object[]

问题是,我有两个版本安装在我的私人构建服务器上的Visual Studio 2017(专业版和企业)。一旦我删除了其中的一个,一切伟大的工作。不知道是否有一种方式来获得它同时安装工作,但我并不需要两个。

© www.soinside.com 2019 - 2024. All rights reserved.