Publishing with AOT causes an error - Cannot find an event named Loaded #34
Unanswered
Bondarenko1990
asked this question in
Q&A
Replies: 2 comments
-
It uses reflection so it's expected you need configure trim roots and preserve reflection information. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Bondarenko1990 Please check https://docs.avaloniaui.net/docs/deployment/native-aot |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I publish with AOT, the application crashes with this error "Cannot find an event named Loaded " when starting. If I build the application without AOT, there are no problems. Help me with this problem.
![image](https://private-user-images.githubusercontent.com/32612104/402942067-047678db-8451-4a88-be01-8158c27b65e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzQzMDMsIm5iZiI6MTczOTI3NDAwMywicGF0aCI6Ii8zMjYxMjEwNC80MDI5NDIwNjctMDQ3Njc4ZGItODQ1MS00YTg4LWJlMDEtODE1OGMyN2I2NWU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDExNDAwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxZGM3OWU1OWQ1NGQzMTMzOWVhYjFmOGY0MTRlNzIzNmI2M2QxNTQ3MTY3NzZmODNlMTNlZDJhMzI4NzljNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.25mnrpg3rPIL3jJxMo_SJNpL02-US3pRFEAFU4edYVw)
<Window x:Class="App.Views.SplashScreenWindow" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:App.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dialogHost="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia" xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity" xmlns:ia="clr-namespace:Avalonia.Xaml.Interactions.Core;assembly=Avalonia.Xaml.Interactions" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="using:App.ViewModels" xmlns:zinonLab="clr-namespace:App" Title="App" Width="900" Height="736" d:DesignHeight="736" d:DesignWidth="900" x:CompileBindings="True" x:DataType="vm:SplashScreenViewModel" Background="Transparent" CanResize="False" RequestedThemeVariant="Dark" SystemDecorations="BorderOnly" WindowStartupLocation="CenterScreen" mc:Ignorable="d">
<Window/>
Beta Was this translation helpful? Give feedback.
All reactions