Skip to content

[Windows] Stop pinning of Visual Studio version #12469

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

subir0071
Copy link
Contributor

Description

This Change proposes to remove the pinned version of Visual Studio from the windows-2022 and windows-2025 runner images.
The version available in the postGRO should automatically get installed into the runner images, without any manual intervention.

Related issue:

https://github.com/github/hosted-runners-images/issues/116

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 18:39
@subir0071 subir0071 marked this pull request as draft June 24, 2025 18:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the hard-pinned Visual Studio channel URI so that the runner images will install whatever version is provided by postGRO by default.

  • Dropped the installChannel field from both Windows 2022 and 2025 toolset JSON configs
  • Removed the InstallChannel parameter and related logic in the Install-VisualStudio helper
  • Simplified the build script to call Install-VisualStudio unconditionally, removing OS-specific branches

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
images/windows/toolsets/toolset-2025.json Removed pinned InstallChannel from VS toolset config
images/windows/toolsets/toolset-2022.json Removed pinned InstallChannel from VS toolset config
images/windows/scripts/helpers/VisualStudioHelpers.ps1 Dropped InstallChannel parameter and updated URI logic
images/windows/scripts/build/Install-VisualStudio.ps1 Simplified install script by removing OS conditionals
Comments suppressed due to low confidence (2)

images/windows/scripts/helpers/VisualStudioHelpers.ps1:18

  • [nitpick] Review the function help block and any examples to ensure all references to the now-removed InstallChannel parameter are cleaned up.
    .PARAMETER RequiredComponents

images/windows/scripts/build/Install-VisualStudio.ps1:7

  • [nitpick] Adjust the indentation of this unconditional Install-VisualStudio call to align with the script's top-level formatting now that the if blocks have been removed.
Install-VisualStudio `

@@ -45,7 +41,7 @@ Function Install-VisualStudio {
$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"
$installChannelUri = "https://aka.ms/vs/${Version}/${Channel}/channel"
Copy link
Preview

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the trailing whitespace at the end of this line to avoid unintended whitespace in the constructed URI.

Suggested change
$installChannelUri = "https://aka.ms/vs/${Version}/${Channel}/channel"
$installChannelUri = "https://aka.ms/vs/${Version}/${Channel}/channel"

Copilot uses AI. Check for mistakes.

@subir0071 subir0071 marked this pull request as ready for review June 24, 2025 19:08
Copy link
Contributor

@paveliak paveliak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants