0

I'm using Visual Studio 2019 for my React project with a C# backend

enter image description here

I keep pressing the red (flame like) apply code changes button in visual studio 2019 to try to update my project.

(I am trying to update a basic text change) and nothing happens at all

I even try refreshing the window manually and my changes aren't recorded until I close the front end and do npm start again, then re-run IIS Express again.

Why would something like this happen?

ZaneK
  • 301
  • 2
  • 14
  • Off-topic but anyone finds Hot Reload utterly slow and counter-productive? I think I work much faster just disabling it. – Luke Vo Dec 08 '21 at 13:46
  • Absolutely disable it - biggest single waste of time retesting over and over with each release - what amazes me is when microsoft say they have this amazing new feature - and how productive it will be. Thats the last thing hot reload can claim to be. Its a waste of time. React and the rest of them can do hot reload properly - microsoft not so much. – Greg Dec 15 '21 at 18:51

1 Answers1

2

Microsoft made it very clear that Hot Reload in VS2019 is not the best,

https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/#best-in-visual-studio-2022-net-6

So if you don't plan to migrate to VS2022 and .NET 6, you won't get the desired results. You can send them feedbacks though, and see if they ever come back to work on VS2019 side.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • @Greg you can claim that it didn't work for you, but unfortunately others see it working. You can review what common settings might be the blockers, https://developercommunity.visualstudio.com/t/blazor-hot-reload-not-working/1480369 – Lex Li Dec 14 '21 at 17:46
  • @Greg, never say NEVER. Sayed Ibrahim Hashimi from Microsoft clearly summarized the cause in the thread and said "If you Start without Debugging, Hot Reload should be working today", and "The team is currently working to enable Hot Reload with Blazor WebAssembly projects when debugging". For me, Hot Reload is just used when editing UI and some of the event handlers so without debugging is fair enough and already saves me tons of hours from restarting the whole application. If you do need that hot reload with debugging then "The fix will be included in the 17.1 release". – Lex Li Dec 15 '21 at 22:34