Hot Reload => Page Refresh possible?
# help-with-umbraco
p
Hey everyone, i hope you're all doing great 🙂 Lately i was working a lot with react & nextjs (not umbraco related) and i really enjoyed the live reload where when i changed something on the code also the Page refreshed directly without me hitting F5 oder the Refresh Button of the Browser. Is this also possible for Umbraco Projects working with asp.net mvc?
m
p
@Mike Chambers Seems to be deprecated
I'm also working with rider.
m
k
VS does this automatically for me if the browser tab was opened by VS (ctrl-f5). Ctrl-shift-b reloads the tab. Using Edge and latest VS preview.
p
@Mike Chambers Thanks for your answer, but this seems to be something else: "By default, Live Edit is enabled only for HTML and CSS files."
@kdx-perbol hmmm.. maybee i need to test it out with VS.
m
so noted limitation in Rider for hotreload.. ?? https://www.jetbrains.com/help/rider/Hot_Reload.html#Limitations "When applying Hot Reload to an ASP.NET Core application, the browser does not refresh automatically."
but as @kdx-perbol says.. debugging in VS studio, or VS community (2022/or preview) hot reload for me refreshes the browser via browser link...
a
I believe Hot Reload is intended for actual code changes (c#), not for cshtml/css
However i'd love it when atleast the browser refreshes when doing an CSS change in Rider.. haven't gotten that to work sadly
So yea Hot Reload is basically what you need if you do code changes, so you don't need to restart it each time, however not all code changes can be hot reloaded, and no auto-refresh 😦
p
So it seems like it is more a problem of Rider than VS right..
a
So it seems sadly 😦
s
Microsoft has decided that Hot Reload will be a Visual Studio feature only. It used to be available to other IDEs but they took that back.
Browser Link was the devil's spawn, if you still see it, disable it 😅
a
Rider has hot reload too, but not the browser refreshing though, just for code
s
Yeah it's nice. But limited (like in VS), a pretty simple refactor will break it most of the time and tell you you need to rebuild anyway. It's a cute feature but not all that useful.
And yes, I meant Hot Reload with browser refreshing is a VS feature only.
p
Thanks @Sebastiaan for your answer! Do you know if it works in "vs code"?
s
I don't think so, they really want you to pay for full Visual Studio
Oh, it's been updated! : > > Updated to add > It appears Microsoft has changed its mind in light of the uproar from developers, and Hot Reload isn't being removed from open-source .NET. On Saturday, .NET's director of program management Scott Hunter said: > > "First and foremost, we want to apologize. We made a mistake in executing on our decision and took longer than expected to respond back to the community. We have approved the pull request to re-enable this code path and it will be in the GA build of the .NET 6 SDK."
So.. maybe? 😁
p
So it could work or will in future?
s
We're on .NET 7 and almost on 8 now, so.. probably. I haven't tried
p
I'll give it a try and let you know 🙂
11 Views