Files
runner-images/images/win/scripts/Installers/Install-Vsix.ps1
Mikhail Timofeev cd4ecad2e6 [Windows] Install vsix extensions using CDN endpoint (#3244)
* Install extensions for VS19

* Get vsix packages name in runtime

* add a bit of debug

* Get extension id from the marketplace uri

* Add extension name

* skip vcredist installation

* Add Get-VsixExtenstionFromMarketplace to ImageHelpers.psm1

* Fix DownloadUri name in the function

* DownloadUri in lower case

* Add packages to the readme

* Add a condition to software report

* fix spelling in function

* Simplify toolset + get rid of backticks
2021-04-23 19:38:43 +03:00

20 lines
864 B
PowerShell

###################################################################################
## File: Install-Vsix.ps1
## Desc: Install the Visual Studio Extensions from toolset.json
###################################################################################
$toolset = Get-ToolsetContent
$vsixPackagesList = $toolset.visualStudio.vsix
if (-not $vsixPackagesList) {
Write-Host "No extensions to install"
exit 0
}
$vsVersion = $toolset.visualStudio.Version
$vsixPackagesList | ForEach-Object {
# 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
}
Invoke-PesterTests -TestFile "Vsix"