Skip to content

{Packaging} FIX: windows pool upgraded from 2019 to 2022#33175

Closed
msarfraz wants to merge 4 commits intodevfrom
msarfraz/upgrade-windows-pool-2022
Closed

{Packaging} FIX: windows pool upgraded from 2019 to 2022#33175
msarfraz wants to merge 4 commits intodevfrom
msarfraz/upgrade-windows-pool-2022

Conversation

@msarfraz
Copy link
Copy Markdown
Contributor

Related command

Description

windows pool upgraded from 2019 to 2022. The Msibuild path is updated w.r.t windows pool 2022 vm.
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings April 13, 2026 01:10
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 13, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

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

Updates Azure Pipelines Windows agent pool selection to Windows Server 2022 and aligns the local Windows MSI build script with the expected Visual Studio 2022 MSBuild install location.

Changes:

  • Switch pipeline windows_pool from pool-windows-2019 to pool-windows-2022.
  • Update build.cmd PATH to include Visual Studio 2022 MSBuild instead of Visual Studio 2019.

Reviewed changes

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

File Description
build_scripts/windows/scripts/build.cmd Updates MSBuild location in PATH for building MSI on Windows 2022/VS2022 environments.
.azure-pipelines/templates/variables.yml Moves pipeline Windows pool variable to the 2022 pool.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

echo.

set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

Using %ProgramFiles% for the VS2022 MSBuild path can resolve to the 32-bit "Program Files (x86)" when the script is run from a 32-bit process, which would break MSBuild discovery (VS2022 installs under the 64-bit Program Files). Prefer using %ProgramW6432% (or vswhere to locate MSBuild) to make the PATH update reliable across environments.

Suggested change
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
set "VS2022_PROGRAM_FILES=%ProgramW6432%"
if "!VS2022_PROGRAM_FILES!"=="" (
set "VS2022_PROGRAM_FILES=%ProgramFiles%"
)
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;!VS2022_PROGRAM_FILES!\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"

Copilot uses AI. Check for mistakes.
@msarfraz msarfraz closed this Apr 13, 2026
@msarfraz msarfraz deleted the msarfraz/upgrade-windows-pool-2022 branch April 13, 2026 01:16
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.

4 participants