Open kadir-ince opened 11 months ago
It is required to recompile C# project in order to see any changes in the previewer. Extension should disable the previewer until user completes his handler method and recompiles the project. With a hint message in the place of the previewer.
Alternatively, extension can force recompilation which isn't always a desired solution.
It is required to recompile C# project in order to see any changes in the previewer. Extension should disable the previewer until user completes his handler method and recompiles the project. With a hint message in the place of the previewer.
It works without recompilation in WPF. Do we have any options to make that work as it does in WPF?
Do we have any options to make that work as it does in WPF
No. Well, we can inject an empty event handler into the assembly, but I feel like it will cause more conflicts between original and modified assemblies.
Keep in mind that WPF previewer didn't actually run the application, but only previewed the XAML.
However, it doesn't even fix even after I recompile the project.
The previewer says invalid markup and the error list says Unable to find suitable setter or adder for property Click of type Avalonia.Controls:Avalonia.Controls.Button for argument System.Private.CoreLib:System.String, available setter parameter lists are: System.EventHandler1[[Avalonia.Interactivity.RoutedEventArgs, Avalonia.Base, Version=11.0.2.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b]]
.
I swear that my function signature is correct and the code is able to run without exceptions. It works normally only after I restarted the whole VS.
Describe the bug
The preview crashes as soon as an event is generated. The preview only comes back to life after building the project. Until then, the preview remains in a crashed state.
https://github.com/AvaloniaUI/AvaloniaVS/assets/52853427/ef280573-7398-44c0-9c47-bf6811ded9be
To Reproduce
Open a AvaloniaUI project in Visual Studio. Use the Avalonia for Visual Studio extension to generate an event. Observe that the preview crashes immediately after the event is generated.
AvaloniaVS plugin version
11.4
Avalonia version
11.0.2
Visual Studio version
17.8.0 Preview 3.0
Relevant log output
Additional context
No response