@@ -223,6 +223,30 @@ jobs:
223223 run : |
224224 $exe = Get-ChildItem -Recurse build -Filter agentty.exe | Select-Object -First 1
225225 Copy-Item $exe.FullName agentty-windows-x86_64.exe
226+ - name : Install WiX toolset + UI extension
227+ shell : pwsh
228+ # build-msi.ps1 invokes `wix build ... -ext WixToolset.UI.wixext`.
229+ # The runner image ships the `wix` dotnet tool but does NOT register
230+ # the UI extension — without it, wix fails with "WIX0144: The
231+ # extension 'WixToolset.UI.wixext' could not be found." We register
232+ # the extension against whatever `wix` is already resolved so the
233+ # extension version always matches the tool (mixing a pinned tool
234+ # with a preinstalled one on PATH causes version skew). Only install
235+ # the tool if it's genuinely absent.
236+ run : |
237+ if (-not (Get-Command wix -ErrorAction SilentlyContinue)) {
238+ dotnet tool install --global wix
239+ $env:PATH = "$env:USERPROFILE\.dotnet\tools;$env:PATH"
240+ "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8
241+ }
242+ wix --version
243+ # Pin the extension to the tool's own version so they match, then
244+ # register it globally. `wix extension add` is idempotent.
245+ # Strip any +buildmetadata suffix — NuGet version refs reject it.
246+ $wixVer = (wix --version).Trim().Split('+')[0]
247+ Write-Host "wix version: $wixVer"
248+ wix extension add -g "WixToolset.UI.wixext/$wixVer"
249+ wix extension list -g
226250 - name : Build (and sign) MSI installer
227251 shell : pwsh
228252 env :
0 commit comments