Forum Discussion
Who is using Hot Reload?
I'm digging Hot Reload. Anyone using it? https://www.youtube.com/watch?v=4S3vPzawnoQ
15 Replies
- nogginboxCopper Contributor
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. - juansturlaCopper ContributorI 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.
- thecodingmanCopper ContributorI 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.
- VaclavEliasCopper ContributorI use it and I like it!
#blazor #razor - AnthCoolCopper ContributorAs 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.
- robwillupCopper Contributor
shanselman
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?
Thanks! - JamesMontemagno
Microsoft
What issues did you run into? - Mahdi HosseiniBrass ContributorYes, but unfortunately I could not use C# code hot reload in WinUI3
- VincentH_NETCopper Contributor
Mahdi Hosseini I found a workaround to get hot reload working in VS 2022 17.1 Pre 1 - see https://twitter.com/vincenth_net/status/1460273173484744710
It works great in .NET 5 and .NET 6.
I am using hot reload to create #CSharpForMarkup gen 2 with C# 10
cc shanselman- nogginboxCopper Contributor
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
- RehanSaeedCopper ContributorTook a look at hot reload in this video. They added some changes to launchSettings.json and then seemed to have rolled those back.
https://www.youtube.com/watch?v=T6iP7QPWmPI - pkanavosCopper ContributorHot 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.