Skip to content

Updating build agent image to use VS2026#14299

Merged
Shyam-Gupta merged 9 commits intomainfrom
dev/shgu/buildImage
Feb 18, 2026
Merged

Updating build agent image to use VS2026#14299
Shyam-Gupta merged 9 commits intomainfrom
dev/shgu/buildImage

Conversation

@Shyam-Gupta
Copy link
Copy Markdown
Member

@Shyam-Gupta Shyam-Gupta commented Feb 13, 2026

VS2022 images have been deprecated this week, and we need to move to VS2026. This change will need to be backported to servicing branches also.

The new images are deployed on Win11 OS, which was causing some test failures due to OS changes. There are no product issues. Details:

The Form_SnapsRightAsync test failed because the Win+Z snap layout panel interaction was broken. The test used Win+Z to open the snap layout panel, then navigated with arrow keys to select the right-half snap position. However, each SendAsync(Form, params object[]) call invoked SetForegroundWindow on the form, which dismissed the snap layout panel before the arrow keys could navigate it. For maximized windows, the window remained maximized and the snap never occurred.
Root Cause

  1. SetForegroundWindow in SendAsync(Form, params object[]) dismissed the Win+Z snap layout panel before arrow keys could navigate it.

  2. Win+Z snap panel keyboard navigation is fragile and varies across Windows versions, making it unreliable for automated testing.

Fix: Replaced Win+Z + keyboard navigation with Win+Left/Win+Right shortcuts in both Form_SnapsLeftAsync(FormWindowState) and Form_SnapsRightAsync(FormWindowState). These shortcuts directly snap windows without requiring interaction with the snap layout panel, making the tests more reliable across Windows versions.


InputLanguage_InputLanguageLayoutId_Expected test for French:

Layout display names may include OS-specific suffixes e.g. "French" became "French (Legacy, AZERTY)" in Windows 11.0. Due to this reason we are using StartsWith instead of equality check for layout name.

Matrix manipulation tests

A bunch of Matrix manipulation tests were failing on x86 platform due to underlying GDI+ changes. Reason was that on floating point overflow, the value now becomes Float.PositiveInfinity instead of Float.MaxValue.

Microsoft Reviewers: Open in CodeFlow

VS2022 images have been deprecated this week and we need to move to VS2026.
This change will need to be backported to servicing branches also.
…p layout panel interaction was broken. The test used Win+Z to open the snap layout panel, then navigated with arrow keys to select the right-half snap position. However, each SendAsync(Form, params object[]) call invoked SetForegroundWindow on the form, which dismissed the snap layout panel before the arrow keys could navigate it. For maximized windows, the window remained maximized and the snap never occurred.

Root Cause
1. SetForegroundWindow in SendAsync(Form, params object[]) dismissed the Win+Z snap layout panel before arrow keys could navigate it.

2. Win+Z snap panel keyboard navigation is fragile and varies across Windows versions, making it unreliable for automated testing.

Fix: Replaced Win+Z + keyboard navigation with Win+Left/Win+Right shortcuts in both Form_SnapsLeftAsync(FormWindowState) and Form_SnapsRightAsync(FormWindowState). These shortcuts directly snap windows without requiring interaction with the snap layout panel, making the tests more reliable across Windows versions.
…"French" became "French (Legacy, AZERTY)" in Windows 11.0. Due to this reason we are using StartsWith instead of equality check for layout name.
merriemcgaw
merriemcgaw previously approved these changes Feb 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.23602%. Comparing base (dc6c73b) to head (beb3550).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #14299         +/-   ##
===================================================
+ Coverage   77.18299%   77.23602%   +0.05302%     
===================================================
  Files           3279        3279                 
  Lines         645137      645107         -30     
  Branches       47730       47731          +1     
===================================================
+ Hits          497936      498255        +319     
+ Misses        143518      143149        -369     
- Partials        3683        3703         +20     
Flag Coverage Δ
Debug 77.23602% <90.47619%> (+0.05302%) ⬆️
integration 19.08237% <ø> (+0.08643%) ⬆️
production 52.16834% <ø> (+0.10739%) ⬆️
test 97.41577% <90.47619%> (+0.01097%) ⬆️
unit 49.55702% <ø> (+0.06186%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…h_AddRoundedRectangle_Float failure on x86.

Issue: Old and new GDI+ are producing different number of points: 19 and 25 respectively for rounded rectangles' arcs.

Fix
Updated both tests to validate shape correctness rather than exact point sequences:
1. Point count: Assert that the count is one of the two valid values (19 or 25)
2. Bounding box: Verify the path bounds match the expected (10, 10, 20, 20) rectangle
3. Key coordinates: Verify the first point (top-right corner start at ~27.5, 10) and last point (top-left corner end at ~12.5, 10) are correct
This makes the tests robust across different GDI+ implementations while still validating that AddRoundedRectangle(Rectangle, Size) produces a geometrically correct rounded rectangle.
…otate() tests were failing on x86 Windows due to floating-point precision differences after RotateTransform(90).

There are tiny epsilon differences (e.g., 1.9E-06 instead of exactly 0). The tests used exact Assert.Equal(0, rotclip.X) for values computed through rotation matrix transforms, which broke on x86.

The same issue already existed on ARM (covered by IsArmOrArm64Process skip guards).

Fix
For all three tests:
1. Replaced exact equality (Assert.Equal(0, value)) with tolerance-based equality (Assert.Equal(0.0, value, 4)) for values computed after RotateTransform() — specifically the .X properties that should be 0 but may have tiny epsilon drift. Note that similar change was already done for verifying other points/lengths.
2. Removed the ARM skip guards (IsArmOrArm64Process + Skip(uint)) since the tolerance-based assertions now handle precision differences on all architectures (ARM, x86, x64).
Copy link
Copy Markdown
Member

@KlausLoeffelmann KlausLoeffelmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.
We should make a mental note about the different floating point "variations", but I think a) it's the underlying API anyway and b) it's fraction variations.

@Shyam-Gupta Shyam-Gupta merged commit e998107 into main Feb 18, 2026
8 checks passed
@Shyam-Gupta Shyam-Gupta deleted the dev/shgu/buildImage branch February 18, 2026 23:26
Shyam-Gupta added a commit that referenced this pull request Feb 18, 2026
* Updating build agent image to use VS2026

VS2022 images have been deprecated this week and we need to move to VS2026.
This change will need to be backported to servicing branches also.

* Using scout images

* The Form_SnapsRightAsync(Maximized) test failed because the Win+Z snap layout panel interaction was broken. The test used Win+Z to open the snap layout panel, then navigated with arrow keys to select the right-half snap position. However, each SendAsync(Form, params object[]) call invoked SetForegroundWindow on the form, which dismissed the snap layout panel before the arrow keys could navigate it. For maximized windows, the window remained maximized and the snap never occurred.

Root Cause
1. SetForegroundWindow in SendAsync(Form, params object[]) dismissed the Win+Z snap layout panel before arrow keys could navigate it.

2. Win+Z snap panel keyboard navigation is fragile and varies across Windows versions, making it unreliable for automated testing.

Fix: Replaced Win+Z + keyboard navigation with Win+Left/Win+Right shortcuts in both Form_SnapsLeftAsync(FormWindowState) and Form_SnapsRightAsync(FormWindowState). These shortcuts directly snap windows without requiring interaction with the snap layout panel, making the tests more reliable across Windows versions.

* Test fix: Layout display names may include OS-specific suffixes e.g. "French" became "French (Legacy, AZERTY)" in Windows 11.0. Due to this reason we are using StartsWith instead of equality check for layout name.

* Test fix for GraphicsPath_AddRoundedRectangle_Integer and GraphicsPath_AddRoundedRectangle_Float failure on x86.

Issue: Old and new GDI+ are producing different number of points: 19 and 25 respectively for rounded rectangles' arcs.

Fix
Updated both tests to validate shape correctness rather than exact point sequences:
1. Point count: Assert that the count is one of the two valid values (19 or 25)
2. Bounding box: Verify the path bounds match the expected (10, 10, 20, 20) rectangle
3. Key coordinates: Verify the first point (top-right corner start at ~27.5, 10) and last point (top-left corner end at ~12.5, 10) are correct
This makes the tests robust across different GDI+ implementations while still validating that AddRoundedRectangle(Rectangle, Size) produces a geometrically correct rounded rectangle.

* Test issue: The VisibleClipBound(), VisibleClipBound_BigClip(), and Rotate() tests were failing on x86 Windows due to floating-point precision differences after RotateTransform(90).
There are tiny epsilon differences (e.g., 1.9E-06 instead of exactly 0). The tests used exact Assert.Equal(0, rotclip.X) for values computed through rotation matrix transforms, which broke on x86.

The same issue already existed on ARM (covered by IsArmOrArm64Process skip guards).

Fix
For all three tests:
1. Replaced exact equality (Assert.Equal(0, value)) with tolerance-based equality (Assert.Equal(0.0, value, 4)) for values computed after RotateTransform() — specifically the .X properties that should be 0 but may have tiny epsilon drift. Note that similar change was already done for verifying other points/lengths.
2. Removed the ARM skip guards (IsArmOrArm64Process + Skip(uint)) since the tolerance-based assertions now handle precision differences on all architectures (ARM, x86, x64).

* Due to GDI+ changes in Windows 11 on x86, floating point overflow causes the value to change to Infinity instead of float.MaxValue.

* Trigger PR update

* Fix for remaining matrix tests which are also failing on x86 due to similar issue as Translation Matrix test.
Shyam-Gupta added a commit that referenced this pull request Feb 19, 2026
* Updating build agent image to use VS2026

VS2022 images have been deprecated this week and we need to move to VS2026.
This change will need to be backported to servicing branches also.

* Using scout images

* The Form_SnapsRightAsync(Maximized) test failed because the Win+Z snap layout panel interaction was broken. The test used Win+Z to open the snap layout panel, then navigated with arrow keys to select the right-half snap position. However, each SendAsync(Form, params object[]) call invoked SetForegroundWindow on the form, which dismissed the snap layout panel before the arrow keys could navigate it. For maximized windows, the window remained maximized and the snap never occurred.

Root Cause
1. SetForegroundWindow in SendAsync(Form, params object[]) dismissed the Win+Z snap layout panel before arrow keys could navigate it.

2. Win+Z snap panel keyboard navigation is fragile and varies across Windows versions, making it unreliable for automated testing.

Fix: Replaced Win+Z + keyboard navigation with Win+Left/Win+Right shortcuts in both Form_SnapsLeftAsync(FormWindowState) and Form_SnapsRightAsync(FormWindowState). These shortcuts directly snap windows without requiring interaction with the snap layout panel, making the tests more reliable across Windows versions.

* Test fix: Layout display names may include OS-specific suffixes e.g. "French" became "French (Legacy, AZERTY)" in Windows 11.0. Due to this reason we are using StartsWith instead of equality check for layout name.

* Test fix for GraphicsPath_AddRoundedRectangle_Integer and GraphicsPath_AddRoundedRectangle_Float failure on x86.

Issue: Old and new GDI+ are producing different number of points: 19 and 25 respectively for rounded rectangles' arcs.

Fix
Updated both tests to validate shape correctness rather than exact point sequences:
1. Point count: Assert that the count is one of the two valid values (19 or 25)
2. Bounding box: Verify the path bounds match the expected (10, 10, 20, 20) rectangle
3. Key coordinates: Verify the first point (top-right corner start at ~27.5, 10) and last point (top-left corner end at ~12.5, 10) are correct
This makes the tests robust across different GDI+ implementations while still validating that AddRoundedRectangle(Rectangle, Size) produces a geometrically correct rounded rectangle.

* Test issue: The VisibleClipBound(), VisibleClipBound_BigClip(), and Rotate() tests were failing on x86 Windows due to floating-point precision differences after RotateTransform(90).
There are tiny epsilon differences (e.g., 1.9E-06 instead of exactly 0). The tests used exact Assert.Equal(0, rotclip.X) for values computed through rotation matrix transforms, which broke on x86.

The same issue already existed on ARM (covered by IsArmOrArm64Process skip guards).

Fix
For all three tests:
1. Replaced exact equality (Assert.Equal(0, value)) with tolerance-based equality (Assert.Equal(0.0, value, 4)) for values computed after RotateTransform() — specifically the .X properties that should be 0 but may have tiny epsilon drift. Note that similar change was already done for verifying other points/lengths.
2. Removed the ARM skip guards (IsArmOrArm64Process + Skip(uint)) since the tolerance-based assertions now handle precision differences on all architectures (ARM, x86, x64).

* Due to GDI+ changes in Windows 11 on x86, floating point overflow causes the value to change to Infinity instead of float.MaxValue.

* Trigger PR update

* Fix for remaining matrix tests which are also failing on x86 due to similar issue as Translation Matrix test.
Shyam-Gupta added a commit that referenced this pull request Feb 19, 2026
…e VS2026 (#14312)

Backport from #14299 

* Updating build agent image to use VS2026

VS2022 images have been deprecated this week and we need to move to
VS2026. This change will need to be backported to servicing branches
also.

* Using scout images

* The Form_SnapsRightAsync(Maximized) test failed because the Win+Z snap
layout panel interaction was broken. The test used Win+Z to open the
snap layout panel, then navigated with arrow keys to select the
right-half snap position. However, each SendAsync(Form, params object[])
call invoked SetForegroundWindow on the form, which dismissed the snap
layout panel before the arrow keys could navigate it. For maximized
windows, the window remained maximized and the snap never occurred.

Root Cause
1. SetForegroundWindow in SendAsync(Form, params object[]) dismissed the
Win+Z snap layout panel before arrow keys could navigate it.

2. Win+Z snap panel keyboard navigation is fragile and varies across
Windows versions, making it unreliable for automated testing.

Fix: Replaced Win+Z + keyboard navigation with Win+Left/Win+Right
shortcuts in both Form_SnapsLeftAsync(FormWindowState) and
Form_SnapsRightAsync(FormWindowState). These shortcuts directly snap
windows without requiring interaction with the snap layout panel, making
the tests more reliable across Windows versions.

* Test fix: Layout display names may include OS-specific suffixes e.g.
"French" became "French (Legacy, AZERTY)" in Windows 11.0. Due to this
reason we are using StartsWith instead of equality check for layout
name.

* Test fix for GraphicsPath_AddRoundedRectangle_Integer and
GraphicsPath_AddRoundedRectangle_Float failure on x86.

Issue: Old and new GDI+ are producing different number of points: 19 and
25 respectively for rounded rectangles' arcs.

Fix
Updated both tests to validate shape correctness rather than exact point
sequences:
1. Point count: Assert that the count is one of the two valid values (19
or 25)
2. Bounding box: Verify the path bounds match the expected (10, 10, 20,
20) rectangle
3. Key coordinates: Verify the first point (top-right corner start at
~27.5, 10) and last point (top-left corner end at ~12.5, 10) are correct
This makes the tests robust across different GDI+ implementations while
still validating that AddRoundedRectangle(Rectangle, Size) produces a
geometrically correct rounded rectangle.

* Test issue: The VisibleClipBound(), VisibleClipBound_BigClip(), and
Rotate() tests were failing on x86 Windows due to floating-point
precision differences after RotateTransform(90). There are tiny epsilon
differences (e.g., 1.9E-06 instead of exactly 0). The tests used exact
Assert.Equal(0, rotclip.X) for values computed through rotation matrix
transforms, which broke on x86.

The same issue already existed on ARM (covered by IsArmOrArm64Process
skip guards).

Fix
For all three tests:
1. Replaced exact equality (Assert.Equal(0, value)) with tolerance-based
equality (Assert.Equal(0.0, value, 4)) for values computed after
RotateTransform() — specifically the .X properties that should be 0 but
may have tiny epsilon drift. Note that similar change was already done
for verifying other points/lengths.
2. Removed the ARM skip guards (IsArmOrArm64Process + Skip(uint)) since
the tolerance-based assertions now handle precision differences on all
architectures (ARM, x86, x64).

* Due to GDI+ changes in Windows 11 on x86, floating point overflow
causes the value to change to Infinity instead of float.MaxValue.

* Trigger PR update

* Fix for remaining matrix tests which are also failing on x86 due to
similar issue as Translation Matrix test.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants