Hot Reloading in ASP.NET core apps

During the development we often need to make small changes in JavaScript, in CSS or in HTML, to check the change on the browse, we have to compile and run the application in Visual Studio, if app is already running in the browser, then have to stop it and restart the project from VS. I found it quite inconvenient and not productive. Whereas other front end tools like ReactJs, Vue has hot reloading feature with their integrated CLI, as soon as we make changes in the code browser immediately reloads that change.

Now .NET Core has this feature with one simple command

dotnet watch run

use this command from project folder using a cmd prompt, this command will start the app in the browser and will watch for changes in the files and restarts when a change is detected. This feature made development productive and painless.

Happy Coding 🙂