Hot Reload, a tool used in the .NET development workspace to streamline the process of developing web applications, allows you to apply code changes, including changes to stylesheets, to a running app without restarting the app and without losing app state, according to Microsoft. However, there’s more to it than just that.
Hot Reload debuted in the October release of Visual Studio 2019, meaning it’s been around for 4 years now. Unfortunately, Microsoft still has not yet perfected its many glitches and problems, and developers are getting pretty tired of it. There have been many occasions where I’ve made a code change, went back over to the browser expecting the content of the site to change, and nothing changed. Even after restarting Hot Reload multiple times, it still didn’t work. And, as it’s often said, Hot Reload causes much more problems than it solves.
Sure, Hot Reload is a quick and easy solution to having to start and stop your application repeatedly in order to apply code changes. However, if all of that is achieved at the expense of having this feature work intermittently, then there’s no point in going through all this work to set it up! It’s not easy to get Hot Reload working with your project, you know–especially if you’re writing in some esoteric .NET language, like the long-forgotten Visual Basic or something even worse. There are cases where .NET Hot Reload has just refused to work altogether. Typing dotnet watch run
prompted an error message each time, and only after fiddling with the hot reload configurations did it actually work.
In a recent project I’m working on in Angular and C#, Hot Reload has been nothing but a hot mess. Instead of calmly applying code changes like it’s supposed to, it forgets to apply them and throws errors in the dev console in Chrome, causing significant problems and eventually leading me to disable it globally. Additionally, Hot Reload also has the tendency to prevent you from debugging your code while it’s running and it has detected that a code change has been made. This is extremely stupid and will slow down your productivity levels, in addition to causing significant frustration.
As if that isn’t bad enough, Hot Reload crams tons of logs right in the terminal whenever you make one tiny code change, clogging things up and preventing you from issuing any more commands in the terminal. Then you have to clear the terminal or worse, open a new one because the other one is a sticky mess because of Hot Reload.
Finally, Hot Reload doesn’t work very well with iOS or Android devices and apps, as you might imagine, since Microsoft developed it. You can’t use it with any sort of Android app, or Hot Reload will just refuse to apply the changes to your app. To cap things off, Hot Reload may just not appear or not be available for any given app you try to use it on. It may throw a bunch of errors, saying that “Hot Reload is not supported for your current app” or something horrible like that.
Overall, Hot Reload is just not a good tool to be using for your project. If you own a live web API that uses Hot Reload, you may find yourself in a bit of a pickle if Hot Reload stops working while the app is in production and causes thousands of customers across the board to lose access to the service. You certainly don’t want that happening, do you? So that’s a good reason to switch away from Hot Reload today and find a more reliable tool to use for that purpose.