Skip to content

[net11.0] Fix build errors: qualify handler types and resolve merge conflicts#32933

Merged
simonrozsival merged 2 commits intodev/simonrozsival/net10.0-use-element-handler-attributesfrom
copilot/sub-pr-29952-again
Dec 1, 2025
Merged

[net11.0] Fix build errors: qualify handler types and resolve merge conflicts#32933
simonrozsival merged 2 commits intodev/simonrozsival/net10.0-use-element-handler-attributesfrom
copilot/sub-pr-29952-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 1, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Follow-up to #28357 - converts built-in controls to use [ElementHandler<THandler>] instead of DI registration.

Build fixes in this commit:

  • Shell.cs / ShellItem.cs: Added Handlers. namespace prefix for ShellHandler and ShellItemHandler references on WINDOWS/TIZEN platforms. These handlers live in Microsoft.Maui.Controls.Handlers and require qualification when referenced from Microsoft.Maui.Controls.

  • Microsoft.Maui.Controls.targets: Resolved merge conflicts - retained both IsCssEnabled runtime feature option and incoming options from main (AreNamescopesSupported, EnableDiagnostics, EnableMauiAspire).

// Before (CS0246 error)
[ElementHandler(typeof(ShellHandler))]

// After
[ElementHandler(typeof(Handlers.ShellHandler))]

Issues Fixed

Fixes build errors:

  • CS0246: The type or namespace name 'ShellHandler' could not be found
  • CS0246: The type or namespace name 'ShellItemHandler' could not be found
  • MSB4024: The imported project file could not be loaded (merge conflict markers in targets file)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…olve merge conflicts

Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
Copilot AI changed the title [WIP] Update built-in visual elements to use ElementHandlerAttribute [net10.0] Fix build errors: qualify handler types and resolve merge conflicts Dec 1, 2025
Copilot AI requested a review from simonrozsival December 1, 2025 11:17
@simonrozsival simonrozsival changed the title [net10.0] Fix build errors: qualify handler types and resolve merge conflicts [net11.0] Fix build errors: qualify handler types and resolve merge conflicts Dec 1, 2025
@simonrozsival simonrozsival marked this pull request as ready for review December 1, 2025 11:25
@simonrozsival simonrozsival merged commit b49551b into dev/simonrozsival/net10.0-use-element-handler-attributes Dec 1, 2025
1 check passed
@simonrozsival simonrozsival deleted the copilot/sub-pr-29952-again branch December 1, 2025 11:25
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants