Closed juwens closed 10 months ago
@kekekeks i tricked the build (for the while beeing) by renaming all maui xaml files to mxaml, like you ava does with axaml.
To workaround this issue: https://github.com/AvaloniaUI/AvaloniaMauiHybrid/issues/7#issuecomment-1703177240
I also needed to disable FluentTheme, because it could not be resolved.
it starts, no avalonia rendering visible yet (but that is expected, cause there is no code for that yet)
due to an shortcoming of avalonia, which tries to parse every xaml file, and terminates and throws an error if it fails
It parses xaml files only if they were added in csproj with <AvaloniaView Include=".xaml" />
. You don't need these.
I also needed to disable FluentTheme, because it could not be resolved.
Add Avalonia.Themes.Fluent package
@maxkatz6
thx for taking a look into it.
It parses xaml files only if they were added in csproj with
<AvaloniaView Include=".xaml" />
. You don't need these.
I think you missed the point where i already analysed and explained that in the issue.
You can try it yourself with my PR (just reset some commits before i renamed to mxaml). In the csproj no single xaml file was added to AvaloniaView.
You can look at the the binlog analysis, the problem has two main components:
https://github.com/AvaloniaUI/AvaloniaMauiHybrid/issues/7#issuecomment-1703177240
https://github.com/AvaloniaUI/AvaloniaMauiHybrid/issues/7#issuecomment-1703291594
@juwens hi! I just updated main branch to Avalonia 11 with .NET 7. Seems to work fine at least on Android.
There were some issues with Kotlin StdLib on android though.
I added workaround for your issue with AdditionalFiles by disabled Name source generator, which is optional for Avalonia (it won't generate c# properties for x:Name xaml elements). I created https://github.com/AvaloniaUI/Avalonia/issues/12855 to track this issue. Either way, it shouldn't block this PR anymore, and mxaml file format is optional now.
@maxkatz6 thanks, i'm very grateful for your help. That'll definitely help.
Cause i try to add maui-windows (WinUI), i discovered an impediment (the lack of a WinUI "AvaloniaView"). Currently i'm digging into the whole platform-abstraction of avalonia and try to implement an AvaloniaView for WinUI https://github.com/AvaloniaUI/Avalonia/issues/12782
@maxkatz6 thanks, i'm very grateful for your help. That'll definitely help.
Cause i try to add maui-windows (WinUI), i discovered an impediment (the lack of a WinUI "AvaloniaView"). Currently i'm digging into the whole platform-abstraction of avalonia and try to implement an AvaloniaView for WinUI AvaloniaUI/Avalonia#12782
if you can add windows and browser without maui, in the same solution as maui hybrid , then we can implement specific code in windows project or in browser project and dont use maui in these plataforms...
see #12
I close it for now, as there are several outstanding things to be solved before continuing here. But i'll try to do a second attempt when i can.
work in progress
blocked by: https://github.com/AvaloniaUI/Avalonia/issues/12782
major
minor
caveats