Hot Reload is the much-awaited feature for Microsoft developers in Visual Studio. By using Hot Reload feature, we can change code while running the application itself. Hot Reload recompiles code after a change and displays it without restarting it.
Open Microsoft Visual Studio 2022 => Create any application. Here I created the Asp.Net Core MVC application. Run the application, it displays the output as below.
Now change the text in Views/Home folder Index.cshtml, save file and click on Hot Reload icon as shown below without stopping the application. Here we changed the text to “This is for testing Hot Reload feature in Microsoft Visual Studio 2022” which displays bottom of the Welcome Header.
Check the Home page, changes automatically will get display without refreshing the screen.
Hot Reload feature works for .cs files also.