1414 build :
1515 permissions :
1616 contents : write
17- runs-on : windows-2022
17+ runs-on : windows-latest
1818
1919 # Steps represent a sequence of tasks that will be executed as part of the job
2020 steps :
@@ -137,22 +137,30 @@ jobs:
137137 Get-Content $proj
138138 Write-Host "=== END .vdproj CONTENT ==="
139139
140- # locate VS 2022
141- - name : Locate Visual Studio 2022
140+ # locate VS 2026
141+ - name : Locate Visual Studio 2026
142142 id : vswhere
143143 shell : pwsh
144144 run : |
145- $installPath = vswhere -latest -products * -requires Microsoft.Component.MSBuild `
146- -property installationPath
147- if (-not $installPath) { throw 'VS 2022 not found' }
145+ $installPath = vswhere -latest -products * -version "[18.0,19.0)" `
146+ -requires Microsoft.Component.MSBuild -property installationPath
147+ if (-not $installPath) {
148+ throw 'VS 2026 (major 18) not found'
149+ }
148150 "installPath=$installPath" >> $env:GITHUB_OUTPUT
149151
150152 # download vs installer builder (v2.0.1)
151153 - name : Download Installer-Projects VSIX
152154 shell : pwsh
153155 run : |
154- $vsixUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2022InstallerProjects/2.0.1/vspackage"
155- Invoke-WebRequest $vsixUrl -OutFile installerprojects.vsix
156+ $vsixUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2026InstallerProjects/2.0.1/vspackage"
157+ $fallbackUrl = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2022InstallerProjects/2.0.1/vspackage"
158+ try {
159+ Invoke-WebRequest $vsixUrl -OutFile installerprojects.vsix -ErrorAction Stop
160+ } catch {
161+ Write-Host "VS2026 Installer Projects package not found, falling back to VS2022 feed."
162+ Invoke-WebRequest $fallbackUrl -OutFile installerprojects.vsix -ErrorAction Stop
163+ }
156164
157165 # install vs installer builder
158166 - name : Install Installer-Projects extension
@@ -162,7 +170,7 @@ jobs:
162170 Write-Host "Running: $vsixInstaller installerprojects.vsix /quiet"
163171 & $vsixInstaller installerprojects.vsix /quiet
164172
165- # Build MSI installer project using Visual Studio 2022 workaround
173+ # Build MSI installer project using Visual Studio 2026 workaround
166174 - name : Build Installer MSI
167175 if : env.build_trigger == 'true'
168176 shell : cmd
0 commit comments