mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
[Windows] Add installer projects to VS on Windows-2022 (#4715)
* [Windows] Add installer projects to VS on windows-2022 * [Windows] Improve the function Install-VsixExtension
This commit is contained in:
@@ -270,10 +270,17 @@ function Install-VsixExtension
|
|||||||
$vsEdition = (Get-ToolsetContent).visualStudio.edition
|
$vsEdition = (Get-ToolsetContent).visualStudio.edition
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
$installPath = ${env:ProgramFiles(x86)}
|
||||||
|
|
||||||
|
if (Test-IsWin22)
|
||||||
|
{
|
||||||
|
$installPath = ${env:ProgramFiles}
|
||||||
|
}
|
||||||
|
|
||||||
#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\${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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if (-not $vsixPackagesList) {
|
|||||||
|
|
||||||
$vsVersion = $toolset.visualStudio.Version
|
$vsVersion = $toolset.visualStudio.Version
|
||||||
$vsixPackagesList | ForEach-Object {
|
$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 $_
|
$vsixPackage = Get-VsixExtenstionFromMarketplace -ExtensionMarketPlaceName $_
|
||||||
Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -VSversion $vsVersion
|
Install-VsixExtension -Url $vsixPackage.DownloadUri -Name $vsixPackage.FileName -VSversion $vsVersion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,7 +241,9 @@
|
|||||||
"Component.MDD.Linux",
|
"Component.MDD.Linux",
|
||||||
"wasm.tools"
|
"wasm.tools"
|
||||||
],
|
],
|
||||||
"vsix": []
|
"vsix": [
|
||||||
|
"VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"docker": {
|
"docker": {
|
||||||
"images": [
|
"images": [
|
||||||
|
|||||||
Reference in New Issue
Block a user