[XSG] Fix ValueProvider creation#31434
Merged
StephaneDelcroix merged 1 commit intonet10.0from Sep 2, 2025
Merged
Conversation
ValueProvider expects the first object to be the parent, not the caller. Also fixes #31381
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the ValueProvider creation in the XSG (XAML Source Generator) by correcting the parent-child relationship in service provider initialization. The key issue was that ValueProvider expects the first object to be the parent, not the caller, and this change also resolves issue #31381.
- Removes conditional compilation directives from XAML unit tests that were gated behind
FIXME_BEFORE_PUBLIC_RELEASE - Updates service provider creation to use parent objects instead of object-and-parents chain
- Fixes the SimpleValueTargetProvider constructor call to pass
thisinstead offalse
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| OnPlatformOptimization.xaml.cs | Removes conditional compilation directives from test method |
| OnPlatform.xaml.cs | Removes conditional compilation directives from multiple test methods |
| Gh4319.xaml.cs | Removes conditional compilation directives from test method |
| Gh3862.xaml.cs | Removes conditional compilation directives from test method |
| ServiceProviderExtensions.cs | Updates ValueProvider creation logic to use parent objects and fixes constructor parameters |
jfversluis
approved these changes
Sep 2, 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, Issues fixed
ValueProvider expects the first object to be the parent, not the caller.
Also