Skip to content

Conversation

@StephaneDelcroix
Copy link
Contributor

Description of Change

x:Reference optimization for XSG wasn't able to walk up the tree when a node is a ListNode

Issues Fixed

x:Reference optimization for XSG wasn't able to walk up the tree when a
node is a ListNode

- fixes #31995
Copilot AI review requested due to automatic review settings October 16, 2025 14:37
@StephaneDelcroix StephaneDelcroix added this to the .NET 10.0 GA milestone Oct 16, 2025
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

Resolves x:Reference source generation not traversing parent ListNode wrappers, enabling proper reference resolution within item templates.

  • Adds a test XAML page (Maui31995) intended to exercise x:Reference inside a BindableLayout/DataTemplate.
  • Updates ProvideValueForReferenceExtension to walk past intermediate ListNode parents before continuing upward.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/Controls/src/SourceGen/KnownMarkups.cs Adjusts ancestor traversal to skip ListNode wrappers for x:Reference resolution.

@MartyIX
Copy link
Contributor

MartyIX commented Oct 16, 2025

I'll try the nuget in the morning. Thank you.

@MartyIX
Copy link
Contributor

MartyIX commented Oct 17, 2025

Unfortunately, I was unable to test nugets because I'm getting

Unable to find package Microsoft.Extensions.Logging.Abstractions with version (>= 10.0.0-rtm.25479.115)

It appears that this nuget package is not public.

@rmarinho
Copy link
Member

Unfortunately, I was unable to test nugets because I'm getting

Unable to find package Microsoft.Extensions.Logging.Abstractions with version (>= 10.0.0-rtm.25479.115)

It appears that this nuget package is not public.

not even with the nuget.config from this branch? it should work with the public feeds there.. just copy them they should be public

@rmarinho
Copy link
Member

/backport release/10.0.1xx

@MartyIX
Copy link
Contributor

MartyIX commented Oct 18, 2025

Thanks. Yes, I can compile my app with this PR's nugets. The compilation error is gone.

@rmarinho
Copy link
Member

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18716522666

@rmarinho rmarinho merged commit 9e8447a into net10.0 Oct 22, 2025
163 checks passed
@rmarinho rmarinho deleted the dev/stdelc/fix31995 branch October 22, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants