With .NET 5, we got a super powerful tool called dotnet.exe
. Developers who 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 many things Visual Studio can do, for example, creating projects, adding and creating NuGet packages, and much more. In the following example, we will create a Blazor Server and a Blazor WebAssembly project using the dotnet command.
Creating projects using the command line
The following steps are to demonstrate 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. The CLI is cross-platform, so this can be used on Linux and macOS as well.
To create a solution with a Blazor app, you can do the following:
dotnet new blazor -o BlazorWebApp
We will not go deeper into the CLI in this book but know that it is a great way...