Fix duplicate issue number crash breaking all Windows UI tests#34991
Merged
jfversluis merged 1 commit intonet11.0from Apr 16, 2026
Merged
Fix duplicate issue number crash breaking all Windows UI tests#34991jfversluis merged 1 commit intonet11.0from
jfversluis merged 1 commit intonet11.0from
Conversation
PR #34669 added Issue8305_Toolbar.cs with [Issue(IssueTracker.Github, 8305, ...)] but Issue8305.cs (Shell Badge, from PR #34659) already uses the same issue number. Both generated DisplayName 'G8305', causing VerifyNoDuplicates() in TestCases.cs to throw NotSupportedException on app startup, crashing ALL UI tests. Fix: - Add issueTestNumber: 1 to Issue8305_Toolbar's [Issue] attribute to produce unique DisplayName 'G8305 (1)' - Replace non-existent icon images (envelope.png, bell.png, cart.png) with images that exist in HostApp resources (bank.png, calculator.png, shopping_cart.png) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34991Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34991" |
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves a HostApp startup crash that was breaking all Windows UI tests by ensuring the Issue8305_Toolbar test case has a unique issue display name and only references image assets that exist in HostApp resources.
Changes:
- Adds
issueTestNumber: 1toIssue8305_Toolbar’s[Issue]attribute to avoid duplicateDisplayNamecollisions (e.g.,G8305). - Replaces non-existent toolbar icon filenames with existing HostApp image resources (
bank.png,calculator.png,shopping_cart.png).
Member
Author
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Apr 16, 2026
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #34669 (ToolbarItem Badge Support) added Issue8305_Toolbar.cs with
[Issue(IssueTracker.Github, 8305, ...)], but Issue8305.cs (Shell Badge, from PR #34659) already uses issue number 8305. Both generated the sameDisplayName = "G8305", causingVerifyNoDuplicates()inTestCases.csto throwNotSupportedExceptionat app startup, crashing the entire HostApp and failing ALL Windows UI tests (not just toolbar tests).This crash has been present since build 1371858 (PR #34669 merge). The follow-up PR #34963 fixed nullable warnings but did not address this crash.
Root Cause
TestCases.cs:VerifyNoDuplicates()(line 161-175) uses a HashSet to check for duplicateDisplayNamevalues. When two[Issue]attributes share the same tracker and number with defaultissueTestNumber=0, they produce identical display names, triggering the crash.Fix
issueTestNumber: 1toIssue8305_Toolbar's[Issue]attribute, producing uniqueDisplayName = "G8305 (1)"instead of duplicate"G8305"envelope.png,bell.png,cart.png) with images that exist in HostApp resources (bank.png,calculator.png,shopping_cart.png)Verification
Controls.TestCases.HostApp(Windows TFM) andControls.TestCases.Shared.Testsbuild successfullyissueTestNumberpattern is well-established (used by Issue11769, Issue13126_2, Issue1583_1, Issue28986_Border, and others)