-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[XamlC] Avoid calling ResourceDictionary.SetAndLoadSource #20776
[XamlC] Avoid calling ResourceDictionary.SetAndLoadSource #20776
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build is failing
D:\a\_work\1\s\.buildtasks\Microsoft.Maui.Controls.targets(154,3): error : Member '__XamlGeneratedCode__.__TypeD79CA40995E82F1C' is declared in another module and needs to be imported [D:\a\_work\1\s\src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj]
7057 Warning(s)
1 Error(s)
@rmarinho please take another look, that bug is fixed now |
This would be a breaking change right? so we would need a breaking change doc ? |
@rmarinho yes, this would be a breaking change in .NET 9. The API is not supposed to be used by developers directly. The XamlC generates calls to these methods. |
Description of Change
This PR adds a separate method in
ResourceDictionary
that compiledRDSourceTypeConverter
can call and which will be more efficient.The old
SetAndLoadSource
is still needed when we're parsing XAML at runtime. It doesn't have to be public anymore because it is now only intended to be called from the non-compiledRDSourceTypeConverter
.Issues Fixed
Fixes #19648