Avalonia.Markup.Declarative
Avalonia.Markup.Declarative copied to clipboard
Hot reload only works in release build
Hot reload does not work in Debug mode.
Hot reload does not work in Debug mode.
Hey! Could you provide sample project where I can reproduce this bug?
I tried it with the sample projects of this repo.
just tired on Visual Studio 2022 debug mode with the sample projects and hot reload was working as expected
I haven't tested it with VS but with Rider.
@BaseCrusher hey! Can you try hot reload with the latest update?
@gritsenko I've just tested it. Sadly it is still not fixed. When running in debug, i can also see the console output for ClearCache
and UpdateApplication
but when running in debug, there is nothing.
@BaseCrusher I found out that bug was related to JetBrains own hot reload implementation, it's actually reloads c# code during debug, but it doesn't send any notification to HotReloadManager. So I added workaround for the Rider support
//init app
AppBuilder.Configure<Application>()
.UseRiderHotReload() //this line adds watcher that checks, if Views were changed during debugging session
.SetupWithLifetime(lifetime);
(It's not published as a nuget package yet, only in sources)
I tested it on my machine and I can confirm that it now works.
The only question for me is, if we should consider creating a ticket at JetBrains to align their behavior with what .Net is using. Did you already create one or should I make one?
I saw only this ticket about it. I think the problem is the same.
https://youtrack.jetbrains.com/issue/RIDER-110981/Blazor-hot-reloading-still-not-working.
I didn't send any ticket, so you can make one if you think it's necessary
Ok, I will create one. If there are updates, I will let you know. :)
Thank you anyway very much for the workaround.