diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 4522bcf7..30084aa4 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -270,10 +270,17 @@ function Install-VsixExtension $vsEdition = (Get-ToolsetContent).visualStudio.edition try { + $installPath = ${env:ProgramFiles(x86)} + + if (Test-IsWin22) + { + $installPath = ${env:ProgramFiles} + } + #There are 2 types of packages at the moment - exe and vsix if ($Name -match "vsix") { - $process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\$VSversion\${vsEdition}\Common7\IDE\VSIXInstaller.exe" -ArgumentList $argumentList -Wait -PassThru + $process = Start-Process -FilePath "${installPath}\Microsoft Visual Studio\${VSversion}\${vsEdition}\Common7\IDE\VSIXInstaller.exe" -ArgumentList $argumentList -Wait -PassThru } else { diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 23d75729..405a4562 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -12,7 +12,7 @@ if (-not $vsixPackagesList) { $vsVersion = $toolset.visualStudio.Version $vsixPackagesList | ForEach-Object { - # Retrieve cdn endpoint to avoid HTTP error 429 https://github.com/actions/virtual-environments/issues/3074 + # Retrieve cdn endpoint to avoid HTTP error 429 https://github.com/actions/virtual-environments/issues/3074 $vsixPackage = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_ Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -VSversion $vsVersion } diff --git a/images/win/toolsets/toolset-2022.json b/images/win/toolsets/toolset-2022.json index 534114d0..2e6151a4 100644 --- a/images/win/toolsets/toolset-2022.json +++ b/images/win/toolsets/toolset-2022.json @@ -241,7 +241,9 @@ "Component.MDD.Linux", "wasm.tools" ], - "vsix": [] + "vsix": [ + "VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects" + ] }, "docker": { "images": [