@@ -83,19 +83,30 @@ jobs:
8383 )
8484 echo Found UnityLauncherPro.exe
8585
86- # download vs installer builder
87- -name :Download Installer‐Projects VSIX
86+ # locate VS 2022
87+ -name :Locate Visual Studio 2022
88+ id :vswhere
89+ shell :pwsh
90+ run :|
91+ $installPath = vswhere -latest -products * -requires Microsoft.Component.MSBuild `
92+ -property installationPath
93+ if (-not $installPath) { throw 'VS 2022 not found' }
94+ Write-Host "##[set-output name=installPath]$installPath"
95+
96+ # download vs installer builder (v2.0.1)
97+ -name :Download Installer-Projects VSIX
8898shell :pwsh
8999run :|
90100 $vsixUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2022InstallerProjects/2.0.1/vspackage"
91101 Invoke-WebRequest $vsixUrl -OutFile installerprojects.vsix
92102
93103# install vs installer builder
94- -name :Install Installer‐ Projects extension
104+ -name :Install Installer- Projects extension
95105shell :pwsh
96106run :|
97- & "${{ steps.vswhere.outputs.installPath }}\Common7\IDE\VSIXInstaller.exe" \
98- installerprojects.vsix /quiet
107+ $vsixInstaller = Join-Path "${{ steps.vswhere.outputs.installPath }}" 'Common7\IDE\VSIXInstaller.exe'
108+ Write-Host "Running: $vsixInstaller installerprojects.vsix /quiet"
109+ & $vsixInstaller installerprojects.vsix /quiet
99110
100111# Build MSI installer project using Visual Studio 2022 workaround
101112 -name :Build Installer MSI