如何在 Azure Devops 中使用 WIX 创建 .msi 安装程序?

问题描述

我正在尝试使用 yaml 脚本在 azure devops 中为我的 dektop 应用程序创建一个带有 wix 的 .msi 安装程序包。下面是为此创建的 msbuild 任务:

- task: MSBuild@1
  inputs:
    solution: '**/*.wixproj'
#    platform: 'Any cpu'
    configuration: 'Release'
    msbuildArguments: '/p:Configuration=Release/p:ProductCode=${product_code} /p:UpgradeCode=${upgrade_code}/t:Clean;Rebuild'
    clean: true

以下是我在管道构建过程中遇到的错误

 Error MSB3441: Cannot get assembly name for "..\MyProject\bin\Release\MyProject.exe". Could not load file or assembly 'MyProject.exe' or one of its dependencies. The system cannot find the path specified.

提前致谢。

解决方法

本文有教程:Enabling CI-CD and Generating MSI Installations