Use the value from toolset visualStudio.edition when locating VSIXInstaller (#2476)

* Use the value from toolset visualStudio.edition when locating VSIXInstaller.

Previously it was hardwired to "Enterprise".

* Changed as per review: https://github.com/actions/virtual-environments/pull/2476#discussion_r559966129
This commit is contained in:
Olafur Egilsson
2021-01-22 07:35:43 +00:00
committed by GitHub
parent cae9df3eab
commit 9d00952bdf

View File

@@ -220,12 +220,13 @@ function Install-VsixExtension
$argumentList = ('/quiet', "`"$FilePath`"") $argumentList = ('/quiet', "`"$FilePath`"")
Write-Host "Starting Install $Name..." Write-Host "Starting Install $Name..."
$vsEdition = (Get-ToolsetContent).visualStudio.edition
try try
{ {
#There are 2 types of packages at the moment - exe and vsix #There are 2 types of packages at the moment - exe and vsix
if ($Name -match "vsix") if ($Name -match "vsix")
{ {
$process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\$VSversion\Enterprise\Common7\IDE\VSIXInstaller.exe" -ArgumentList $argumentList -Wait -PassThru $process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\$VSversion\${vsEdition}\Common7\IDE\VSIXInstaller.exe" -ArgumentList $argumentList -Wait -PassThru
} }
else else
{ {