Live Chat Icon For mobile
Live Chat Icon

Do we have a live-reload option in Blazor like in Angular and React?

Platform: Blazor| Category: General

Solution 1: 
Auto-rebuild functionality is now available for Blazor Projects in Visual Studio. To utilize this feature, run the project using the Ctrl + F5 shortcut (without the debugger) instead of F5 and on IIS Express. Whenever you modify and save .cs and .razor files within the solution, they will be automatically rebuilt, and the application will restart. This allows you to view the changes by simply refreshing the browser, eliminating the need for manual rebuilding and restarting the application. 

Solution 2: 

you can use the following command in the command prompt. 

dotnet watch run debug

Also, you must include the following file types in the .csproj file for which files you want to watch. 


    <Watch Include="..\**\*.razor" /> 

    <Watch Include="..\**\*.scss" /> 

    <Watch Include="..\**\*.cs" /> 


Refer to this Link for more information. 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.