In your command prompt, run the following commands:
In your terminal, run the following commands:
dotnet new blazorserver -o BlazorApp --no-https cd BlazorApp
dotnet new blazorservercommand creates a new Blazor Server app for you.
-oparameter creates a directory named
BlazorAppwhere your app is stored and populates it with the required files.
--no-httpsflag specifies not to enable HTTPS.
cd BlazorAppchanges your directory to the one you just created.
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.