You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1019 B

sidebar_position title
15 Coding live

What is dotnet watch?

dotnet watch is a function that executes .NET Core CLI commands each time a source file changes (In big as soon as we record).

Therefore, the command that we will associate will be run!

In short, we will execute our project each time we save our work.

dotnet watch run

This feature saves time during Blazor app development.

Usage in Visual Studio 2019

You can directly open a Powershell window from the View -> Terminal menu.

Once in the terminal, change the current directory to that of your application, where your csproj file is.

Execute the command:

dotnet watch run

Your browser opens with your application, now return to Visual Studio, with each new backup your site will be compiled and updated in your browser.

Usage in Visual Studio 2022

Visual Studio 2022 natively supports Hot Reload which eliminates the need to use this command.