22

I have a build setup that at the end builds a Wix project to create an MSI for my application. When I try to run the build it gets to the link step and hangs for about an hour before it gets cancelled. There's no error information or any information that would explains what might be going on. The logs where it hangs are:

Link:
  C:\Program Files (x86)\WiX Toolset v3.11\bin\Light.exe -out D:\a\1\s\myapplication.msi -pdbout D:\a\1\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\1\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.

The configuration I'm using is:

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

I've tried changing a few of the options like the tagret and configuration but with no luck. If I run essentially the same command locally it takes about 20 seconds to build the Wix project. What is going on? Is there any way of finding out what is causing this step to hang?

Edit

Eric's answer below solved this issue. For anyone that may come across this my final config that worked was as follows:

- task: MSBuild@1
      displayName: 'Building Installer'
      inputs:
        solution: '/path/to/solution'
        platform: 'x86'
        configuration: 'Release'
        msbuildArguments: >
          /target:Build
          /p:RunWixToolsOutOfProc=true
amura.cxg
  • 2,348
  • 3
  • 21
  • 44

1 Answers1

32

Try and add this additional MSBuild argument. /p:RunWixToolsOutOfProc=true.

Background some here wixtoolset github and looks like the underlining issue is fixed, just not in the mainline yet.

Eric Smith
  • 2,340
  • 12
  • 16
  • 2
    Looks like you're right about the issue. Your second link is exactly the same issue we were seeing and adding that MSBuild Argument got our build to stop freezing. Really appreciate you sharing that! – amura.cxg Feb 10 '20 at 14:38
  • If you use `VSBuild@1` instead of `MSBuild@1`, you need an other (similar) task input argument: `msbuildArgs:` – Beauty Sep 13 '21 at 20:59