Who is using Hot Reload?


I'm digging Hot Reload. Anyone using it? https://www.youtube.com/watch?v=4S3vPzawnoQ

15 Replies
Yup, love it... Plain old ASP Core API... Make some changes, hit the fire button and enjoy!
Hot Reload in `dotnet watch` is great. Just a few days ago I used Hot Reload in a *console* application to generate DTOs from yet another dreaded "Excel Requirements Document". Make a change to the source, save, check the outcome, repeat until satisfied.

I used VS Code as the editor but I could easily have used Sublime.
Took a look at hot reload in this video. They added some changes to launchSettings.json and then seemed to have rolled those back.

Yes, but unfortunately I could not use C# code hot reload in WinUI3
What issues did you run into?

I am, and it's awesome!
Thanks for the video by the way!
Quick question though:
Why doesn't it work when the while loop is in the `OutputPid()` function instead of in "Main()"? Does it have something to do with not being able to rewrite the static entrypoint? I don't understand how having the while loop in the `OutputPid()` function rewrites that entrypoint?

As soon as I get to install VS 2022 GA next week and learn how to use it, I will be. lol Still waiting till the tooling is fully baked for release.
I use it and I like it!

#blazor #razor
I tried using it on a large Blazor Wasm project and ran into all kinds or problems, and errors. It ended up being faster to dev when it is turned off.
I tried with .NET MAUI but it wasn't working very well, when I edited my code during runtime I got an error that I needed to restart the application.

I've tried, but think I'm doing something wrong.

Made a new .NET Maui App. Ticked hot reload on save. I made a simple change to my XAML and saved it. My UI was not updated. Then clicked the hot reload button multiple times. Waited a bit. Hit it some more times. Given up on hot reload for now.

@Mahdi Hosseini I found a workaround to get hot reload working in VS 2022 17.1 Pre 1 - see here.
It works great in .NET 5 and .NET 6.

I am using hot reload to create #CSharpForMarkup gen 2 with C# 10
cc @shanselman 

@VincentH_NET I don't understand the fix. I can't find PublishReadyToRun in my solution anywhere. Perhaps I have a different issue with hot reload, but I might just have misunderstood something. Am I missing something

@nogginbox My fix was for a WinUI 3 Preview 3 Desktop app; I don't know whether it applies to a Maui project (which is implemented on top of WinUI for the Windows target only).

Anyway, in a WinUI 3 Desktop app the PublishReadyToRun setting is found in the application's publish profiles, maybe you can find in in a Maui project as well:



It's Maui, but as far as I know still using WinUI 3 under the hood. However, there are no publish settings. So they're either not used or hidden as part of the cross platform stuff. It feels like the same problem though.