In your command prompt, run the following command:
In your terminal, run the following command:
dotnet watch run
dotnet watch run command will build and start the app, and then rebuild and restart the app whenever you make code changes. You can stop the app at any time by selecting Ctrl+C.
Wait for the app to display that it's listening on
http://localhost:5000 and for the browser to launch at that address.
Once you get to the following page, you have successfully run your first Blazor app!
The displayed page is defined by the
Pages/Index.razor file. This is what its contents look like:
@page "/" <h1>Hello, world!</h1> Welcome to your new app. <SurveyPrompt Title="How is Blazor working for you?" />
It already contains the code that sets it as the homepage and displays the text "Hello, world!" and "Welcome to your new app". It also includes a
SurveyPrompt component that renders a link to the Blazor feedback survey.