[SG] generated code behind for RD in global xmlns#31623
Merged
StephaneDelcroix merged 1 commit intonet10.0from Sep 17, 2025
Merged
[SG] generated code behind for RD in global xmlns#31623StephaneDelcroix merged 1 commit intonet10.0from
StephaneDelcroix merged 1 commit intonet10.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes ResourceDictionary code generation for source generators when using the global xmlns namespace. Previously, the code behind generator wasn't creating the necessary boilerplate code for ResourceDictionary files that used the global MAUI namespace, which affected both XamlC compilation and source generation performance.
- Adds support for
MauiGlobalUrinamespace in addition to the existingMauiUrifor ResourceDictionary code generation - Includes a new test case to verify the fix works correctly for ResourceDictionary with global xmlns
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Controls/tests/SourceGen.UnitTests/SourceGenXamlCodeBehindTests.cs |
Adds test case for ResourceDictionary with aggregated global xmlns |
src/Controls/src/SourceGen/CodeBehindCodeWriter.cs |
Updates condition to include MauiGlobalUri namespace for code generation |
mattleibow
previously approved these changes
Sep 15, 2025
5a22f89 to
00879c8
Compare
we weren't generating the boiler plate for ResourceDictionary using the global xmlns for XamlC compilation or sourcegen. fixing that, and getting back the #performance - fies #31602
00879c8 to
e9c26d8
Compare
jfversluis
approved these changes
Sep 17, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description of Change
we weren't generating the boiler plate for ResourceDictionary using the global xmlns for XamlC compilation or sourcegen.
fixing that, and getting back the #performance
Issues Fixed