Blazor Tutorial - Build your first Blazor app

Run your app

In your command prompt, run the following command:

In your terminal, run the following command:

Command prompt
dotnet run

Wait for the command to display that it's listening on http://localhost:5000 and then, open a browser and navigate to that address.

Once you get to the following page, you have successfully run your first Blazor app!

The home page of your site contains some text and presents several tabs on the left to click and explore.

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.