Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows 22 & 25 ] Upgrade visual studio to postGRO channel #11595

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions images/windows/scripts/build/Install-VisualStudio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@
## File: Install-VisualStudio.ps1
## Desc: Install Visual Studio
################################################################################

$vsToolset = (Get-ToolsetContent).visualStudio

# Install VS
Install-VisualStudio `
-Version $vsToolset.subversion `
-Edition $vsToolset.edition `
-Channel $vsToolset.channel `
-RequiredComponents $vsToolset.workloads `
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64" `
-SignatureThumbprint $vsToolset.signature
if (Test-IsWin19) {
# Install Visual Studio for Windows 19
Install-VisualStudio `
-Version $vsToolset.subversion `
-Edition $vsToolset.edition `
-Channel $vsToolset.channel `
-RequiredComponents $vsToolset.workloads `
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64" `
-SignatureThumbprint $vsToolset.signature
}

if ( (Test-IsWin22) -or (Test-IsWin25) ) {
# Install Visual Studio for Windows 22 and 25 with InstallChannel
Install-VisualStudio `
-Version $vsToolset.subversion `
-Edition $vsToolset.edition `
-Channel $vsToolset.channel `
-InstallChannel $vsToolset.installChannel `
-RequiredComponents $vsToolset.workloads `
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64" `
-SignatureThumbprint $vsToolset.signature
}

# Find the version of VS installed for this instance
# Only supports a single instance
Expand Down
15 changes: 13 additions & 2 deletions images/windows/scripts/helpers/VisualStudioHelpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -45,6 +55,7 @@ Function Install-VisualStudio {

try {
$responseData = @{
"installChannelUri" = $installChannelUri
"channelUri" = $channelUri
"channelId" = $channelId
"productId" = $productId
Expand Down
3 changes: 2 additions & 1 deletion images/windows/toolsets/toolset-2022.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
"subversion" : "17",
"edition" : "Enterprise",
"channel": "release",
"signature": "8F985BE8FD256085C90A95D3C74580511A1DB975",
"installChannel": "148093173_-450296497",
"signature": "245D262748012A4FE6CE8BA6C951A4C4AFBC3E5D",
"workloads": [
"Component.Dotfuscator",
"Component.Linux.CMake",
Expand Down
3 changes: 2 additions & 1 deletion images/windows/toolsets/toolset-2025.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@
"subversion" : "17",
"edition" : "Enterprise",
"channel": "release",
"signature": "8F985BE8FD256085C90A95D3C74580511A1DB975",
"installChannel": "148093173_-450296497",
"signature": "245D262748012A4FE6CE8BA6C951A4C4AFBC3E5D",
"workloads": [
"Component.Dotfuscator",
"Component.Linux.CMake",
Expand Down