In your command prompt, run the following command to create your app:
In your terminal, run the following command to create your app:
dotnet new blazorserver -o BlazorApp --no-https
This command creates your new Blazor app project and places it in a new directory called
BlazorApp inside your current location.
Navigate to the new
BlazorApp directory created by the previous command:
Take a quick look at the contents of the
BlazorApp directory. Several files were created in the
BlazorApp directory, to give you a simple Blazor app that is ready to run.
Program.csis the entry point for the app that starts the server and where you configure the app services and middleware.
App.razoris the root component for the app.
Pagesdirectory contains some example web pages for the app.
BlazorApp.csprojdefines the app project and its dependencies.
launchSettings.jsonfile inside the
Propertiesdirectory defines different profile settings for the local development environment. A port number ranging between 5000-5300 is automatically assigned at project creation and saved on this file.
Take note of the
BlazorApp directory path as you will use it later in the tutorial.
If everything looks good, select the Continue button below to go to the next step.
If you receive a message similar to
Template "Blazor Server App" could not be created. Access to the path 'C:\Windows\System32\BlazorApp' is denied, change your current directory to one where you have permissions to create a new folder and try to run the command again. If you can't resolve the issue, use the I ran into an issue button below to get help fixing the problem.
If Windows can't find the SDK when you try to create the project and you are sure you have installed the SDK, your machine might have an issue with the PATH environment variable. See this Stack Overflow post for instructions on how to diagnose and fix this issue.
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.