Skip to content

[Backport to release/11.0-preview2]: Updating build agent image to use VS2026#14312

Merged
Shyam-Gupta merged 1 commit intorelease/11.0-preview2from
dev/shgu/buildImage_11.0_p2
Feb 19, 2026
Merged

[Backport to release/11.0-preview2]: Updating build agent image to use VS2026#14312
Shyam-Gupta merged 1 commit intorelease/11.0-preview2from
dev/shgu/buildImage_11.0_p2

Conversation

@Shyam-Gupta
Copy link
Copy Markdown
Member

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

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.

* 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 Shyam-Gupta self-assigned this Feb 19, 2026
@Shyam-Gupta Shyam-Gupta requested a review from a team as a code owner February 19, 2026 00:15
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.22858%. Comparing base (6ac21ae) to head (3a79fd9).
⚠️ Report is 2 commits behind head on release/11.0-preview2.

Additional details and impacted files
@@                       Coverage Diff                        @@
##           release/11.0-preview2      #14312          +/-   ##
================================================================
- Coverage               97.40479%   77.22858%   -20.17622%     
================================================================
  Files                       1214        3279        +2065     
  Lines                     357428      645107      +287679     
  Branches                    5598       47731       +42133     
================================================================
+ Hits                      348152      498207      +150055     
- Misses                      8484      143205      +134721     
- Partials                     792        3695        +2903     
Flag Coverage Δ
Debug 77.22858% <90.47619%> (-20.17622%) ⬇️
integration 19.07052% <ø> (?)
production 52.15165% <ø> (?)
test 97.41577% <90.47619%> (+0.01097%) ⬆️
unit 49.54902% <ø> (?)

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.

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.

Yep - consistent déjà-vu!
:shipit:

@Shyam-Gupta Shyam-Gupta merged commit 6668f68 into release/11.0-preview2 Feb 19, 2026
10 checks passed
@Shyam-Gupta Shyam-Gupta deleted the dev/shgu/buildImage_11.0_p2 branch February 19, 2026 20:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 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.

2 participants