ASP.NET Core 6.0 Features

Last Updated: 5/12/2022

Hot Reload Support for ASP.NET Core

Overview

  • .NET Hot Reload applies code changes, including changes to stylesheets, to a running app without restarting the app and without losing app state.
  • Hot Reload is supported for all ASP.NET Core 6.0 and later projects.

MVC and Razor Pages

In MVC and Razor Pages apps, Hot Reload triggers a browser refresh automatically.

Blazor WebAssembly

In Blazor apps, the framework triggers a Razor component render automatically.

Supported

  • Hot Reload reacts to most changes to method bodies, such as adding, removing, and editing variables, expressions, and statements.
  • Changes to the bodies of lambda expressions and local functions are also supported.

Not Supported

  • Adding new lambdas or local functions, adding a new await operator or yield keyword expression is not supported. Changing the names of method parameters is not supported. Changes outside of method bodies is not supported.

.NET CLI

Hot Reload is activated using the dotnet watch command: dotnet watch

References: