Click on the Start Debugging button (green arrow) in the Debug Toolbar in Visual Studio to run your app.
Once the app is running, you can apply code changes to the running app by clicking the Hot Reload button.
You can stop the app at any time by clicking on the Stop button in the top toolbar.
The first time you run a web app in Visual Studio, it will set up a development certificate for hosting the app over HTTPS and then prompt you to trust the certificate. We recommend agreeing to trust the certificate. The certificate will only be used for local development, and without it most browsers will complain about the security of the website.
Wait for the app to launch in the browser. Once you get to the following page, you have successfully run your first Blazor app!
The displayed page is defined by the
Home.razor file located inside the
Components/Pages directory. This is what its contents look like:
Welcome to your new app.
It already contains the code that sets it as the homepage and displays the text
Hello, world! and
Welcome to your new app. The
PageTitle component sets the title for the current page so that it shows up in the browser tab.
If you receive an error message saying "Your connection is not private" with error code NET::ERR_CERT_INVALID, try to restart all browser windows so the new certificate can be picked up by the browser and run the application again.
If you can't resolve the issue you're having, select the I ran into an issue button below to get help fixing the problem.