I have a .NET application that can be built for both 4.8 and 6.0 but hot reload only works in the 4.8 version of the application.
Does anyone know what could be going on or the steps that i could take to resolve this?
I went through the troubleshooting tips and ensured that the environment variable was set for both builds at runtime. Also, my window has the 'Hot Reload available' badge with ok status. Something weird that i noticed is that i dont get Hot Reload output in 4.8 but Hot Reload is working. But inn .NET 6, i get the following Hot Reload output:
16:18 15.28 Cboe.Raptor.UI.Launcher (20): Hot Reload session started.
16:18 36.94 Cboe.Raptor.UI.Launcher (20):45960: The process has exited.
16:18 36.94 Cboe.Raptor.UI.Launcher (20): Hot Reload session complete.
but Hot Reload is not working.
I initially suspected that Hot Reload doesn't like some assembly but this project is too large for handchecking to be feasible.
CodePudding user response:
I'm using WPF .NET 6 and I was having the same problem (no hot reload, although without your error messages).
I just had to comment out <PublishSingleFile>true</PublishSingleFile>
in my .csproj file and everything went back to normal.
Hao Yu-MSFT's answer reminded me I had too an app-wide setting and I tried commenting them all one-by-one :D
CodePudding user response:
Plus this to try:
#if !DEBUG
app.UseResponseCompression();
#endif