mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[windows 22 & 25 ] Upgrade visual studio to postGRO channel (#11595)
* [windows 22 and 25 Upgrade visual studio to postGRO * Add condition for windows 19 to skip * [Windows] Update Vs installation script * Refactor the visual studio installation script * Fix windows 19 faliure * Fix windows 19 visual studio failure * [windows] Fix Windows 19 failure * Add condition for windows 19 * [windows] Fix windows 19 failure * [windows] update script by changing the condition syntax * Make installchannel as optioanl parametr * Update Installer script * [ windows ] Update the installation script with conditional statement * Update the installation script * Update toolsets * Update the channel ID * Update channel ID * Resolve conflicts * Resolve conflicts
This commit is contained in:
committed by
GitHub
parent
9b2b536f10
commit
b5421c9536
@@ -14,6 +14,9 @@ Function Install-VisualStudio {
|
||||
|
||||
.PARAMETER Channel
|
||||
The channel of Visual Studio that will be installed. Required parameter.
|
||||
|
||||
.PARAMETER InstallChannel
|
||||
The InstallChannelUri of Visual Studio that will be installed. Required parameter.
|
||||
|
||||
.PARAMETER RequiredComponents
|
||||
The list of required components. Required parameter.
|
||||
@@ -27,15 +30,22 @@ Function Install-VisualStudio {
|
||||
[Parameter(Mandatory)] [String] $Version,
|
||||
[Parameter(Mandatory)] [String] $Edition,
|
||||
[Parameter(Mandatory)] [String] $Channel,
|
||||
[String] $InstallChannel = "",
|
||||
[Parameter(Mandatory)] [String[]] $RequiredComponents,
|
||||
[String] $ExtraArgs = "",
|
||||
[Parameter(Mandatory)] [String[]] $SignatureThumbprint
|
||||
)
|
||||
|
||||
$bootstrapperUrl = "https://aka.ms/vs/${Version}/${Channel}/vs_${Edition}.exe"
|
||||
|
||||
|
||||
if (-not (Test-IsWin19)) {
|
||||
$bootstrapperUrl = "https://aka.ms/vs/${Version}/postGRO-${Channel}/vs_${Edition}.exe"
|
||||
} else {
|
||||
$bootstrapperUrl = "https://aka.ms/vs/${Version}/${Channel}/vs_${Edition}.exe"
|
||||
}
|
||||
$channelUri = "https://aka.ms/vs/${Version}/${Channel}/channel"
|
||||
$channelId = "VisualStudio.${Version}.Release"
|
||||
$productId = "Microsoft.VisualStudio.Product.${Edition}"
|
||||
$installChannelUri = "https://aka.ms/vs/${Version}/${Channel}/${installchannel}/channel"
|
||||
|
||||
Write-Host "Downloading Bootstrapper ..."
|
||||
$bootstrapperFilePath = Invoke-DownloadWithRetry $BootstrapperUrl
|
||||
@@ -45,6 +55,7 @@ Function Install-VisualStudio {
|
||||
|
||||
try {
|
||||
$responseData = @{
|
||||
"installChannelUri" = $installChannelUri
|
||||
"channelUri" = $channelUri
|
||||
"channelId" = $channelId
|
||||
"productId" = $productId
|
||||
|
||||
Reference in New Issue
Block a user