-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 error in .NET 9 Preview 5 #22975
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
Something is odd here that it's showing DataTemplate for the baseClass coming from the MPowerKit.VirtualizeListView module. Looking at that assembly, I do not see any duplicated types, so what would be causing it to appear as though it's imported from that module? |
All my custom ContentPage inherited XAML definitions are resulting in XAMLC errors. When I surround the XAML with the ContentPage's Content node, it compiles. In that case, all my customization is not working. Understand it's a Preview release but the basic scenario itself is failing. UT needs to be strengthened further. |
Verified this issue on VS Code 1.90.0 (9.0.0-preview.5.24307.10). Can repro it with sample project. |
It seems this may be due to a change in the runtime. We are currently investigating this and have some ideas of how we can at least mitigate it in the short term. |
I also experienced this issue, it propagated as a compiler error for the MAUI community toolkit, whilst compiling. XC0009 No property, BindableProperty, or event found for "Content", or mismatching type between value and property.
My temporary workaround was to switch the TargetFramework from
to
But I'm now installing dotnet SDK 9 preview 4 and referencing that from my global.json file to force my project to use preview 4 instead of preview 5
|
Could you try enclosing the <toolkit:Popup.Content>
<!-- Everything in-betwen -->
</toolkit:Popup.Content> |
I'm sorry, but this doesn't fix it. |
This crude method works. Define an intermediate base class and modify your Popups to inherit from it. public class MauiPopup : Popup
{
public override View? Content
{
get => base.Content;
set => base.Content = value;
}
} |
Another example of this: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/expander <mct:Expander>
<mct:Expander.Header>
<Label Text="Baboon"
FontAttributes="Bold"
FontSize="Medium" />
</mct:Expander.Header>
<HorizontalStackLayout Padding="10">
<Image Source="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Papio_anubis_%28Serengeti%2C_2009%29.jpg/200px-Papio_anubis_%28Serengeti%2C_2009%29.jpg"
Aspect="AspectFill"
HeightRequest="120"
WidthRequest="120" />
<Label Text="Baboons are African and Arabian Old World monkeys belonging to the genus Papio, part of the subfamily Cercopithecinae."
FontAttributes="Italic" />
</HorizontalStackLayout>
</mct:Expander> |
Tested 8.0.70-ci.net8.24320.1 and I'm no longer seeing the error. A result of #23031 being merged? Nightly 9.0.0-preview.5.24307.10 still generates the error. In both cases building with |
Description
https://github.com/davidortinau/AllTheLists
https://github.com/davidortinau/AllTheLists/blob/main/src/Pages/VirtualListViewPage.xaml#L14
Works in .NET 9 Preview 4. Getting this error on Preview 5. Same
ContentView
works fine inCollectionView
andListView
but is throwing errors in these other controls. Maybe it's not that view at all, but the implementation of those controls.Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.0-preview.4.10690
Affected platforms
iOS, Android, macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: