Using the command line
With .NET 5, you get a super powerful tool called dotnet.exe
. Developers that have used .NET Core before will already be familiar with the tool, but with .NET 5, it is no longer exclusively for .NET Core developers.
It can do a lot of the things Visual Studio can do, for example, creating projects, adding and creating NuGet packages, and much more. In the next example, we will create a Blazor Server project.
Creating a Blazor Server project using the command line
The following steps are just for demonstrating the power of using the command line. We will not use this project later in the book, so if you don't want to try it, go ahead and skip this section. To create a new Blazor Server project, you can use this command:
dotnet new blazorserver -o BlazorServerSideApp
Here, dotnet
is the command, and to create a new project, you use the new
parameter.
blazorserver
is the name of the template and -o
is the output folder (in this case, the project...