Skip to content

Conversation

@StephaneDelcroix
Copy link
Contributor

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

@StephaneDelcroix StephaneDelcroix added this to the .NET 10.0-rc2 milestone Sep 15, 2025
@StephaneDelcroix StephaneDelcroix requested a review from a team as a code owner September 15, 2025 20:27
Copilot AI review requested due to automatic review settings September 15, 2025 20:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 MauiGlobalUri namespace in addition to the existing MauiUri for 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
mattleibow previously approved these changes Sep 15, 2025
@PureWeen PureWeen moved this to Ready To Review in MAUI SDK Ongoing Sep 16, 2025
@PureWeen PureWeen added the p/0 Work that we can't release without label Sep 16, 2025
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
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Sep 17, 2025
@StephaneDelcroix StephaneDelcroix merged commit 5d1c1d7 into net10.0 Sep 17, 2025
148 checks passed
@StephaneDelcroix StephaneDelcroix deleted the dev/stdelc/xsg/fix31602 branch September 17, 2025 08:45
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Sep 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

p/0 Work that we can't release without

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants