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.
Startup.csis where you configure the app services and middleware.
App.razoris the root component for the app.
BlazorApp/Pagesdirectory contains some example web pages for the app.
BlazorApp.csprojdefines the app project and its dependencies.
Take note of the
BlazorApp directory path as you will use it later in the tutorial.
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 to get help fixing the problem.