构建 Wix 安装程序时构建挂起

Build hangs while building Wix Installer

我有一个构建设置,它最后构建了一个 Wix 项目来为我的应用程序创建一个 MSI。当我尝试 运行 构建时,它会进入 link 步骤并在取消前挂起大约一个小时。没有错误信息或任何可以解释可能发生的情况的信息。它挂起的日志是:

Link:
  C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out D:\a\s\myapplication.msi -pdbout D:\a\s\myapplication.wixpdb -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUtilExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll" -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\WixNetFxExtension.dll" -sice:ICE30 -sice:ICE80 -contentsfile obj\Release\Installer.wixproj.BindContentsFileListnull.txt -outputsfile obj\Release\Installer.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Release\Installer.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile D:\a\s\Installer.wixproj obj\Release\pthC2B68370CAB72F5041F3FBDF89753BBA\ActionsAndSequences.wixobj obj\Release\pthC2B68370CAB72F5041F3FBDF89753BBA\LangComponents.wixobj obj\Release\pthC2B68370CAB72F5041F3FBDF89753BBA\Upgrades.wixobj obj\Release\pthF392250A412040E3E7164BEF9B45533D\ClientUIFlow.wixobj obj\Release\pthF392250A412040E3E7164BEF9B45533D\OldClientWarningDlg.wixobj obj\Release\pthF392250A412040E3E7164BEF9B45533D\SetServicesUrlDlg.wixobj obj\Release\pthC2B68370CAB72F5041F3FBDF89753BBA\Components.wixobj obj\Release\Product.wixobj
  Windows Installer XML Toolset Linker version 3.11.2.4516
  Copyright (c) .NET Foundation and contributors. All rights reserved.

我使用的配置是:

- task: MSBuild@1
      displayName: 'Building Installer'
      inputs:
        solution: '/path/to/solution'
        platform: 'x86'
        configuration: 'Release'
        msbuildArguments: >
          /target:Build

我试过更改一些选项,例如 tagret 和配置,但没有成功。如果我 运行 在本地使用基本相同的命令,则构建 Wix 项目大约需要 20 秒。到底是怎么回事?有什么方法可以找出导致此步骤挂起的原因吗?

编辑

下面 Eric 的回答解决了这个问题。对于可能遇到此问题的任何人,我的最终配置如下:

- task: MSBuild@1
      displayName: 'Building Installer'
      inputs:
        solution: '/path/to/solution'
        platform: 'x86'
        configuration: 'Release'
        msbuildArguments: >
          /target:Build
          /p:RunWixToolsOutOfProc=true

尝试添加这个额外的 MSBuild argument/p:RunWixToolsOutOfProc=true

这里有一些背景 wixtoolset github and looks like the underlining issue is fixed,只是还没有在主线中。