New Hot Reload feature in Microsoft Visual Studio 2022

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.

 

A picture containing background pattern

Description automatically generated

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.

 

Graphical user interface, text, application

Description automatically generated

Hot Reload feature works for .cs files also.

tags:

share: