Appendix A: The dotnet Tool

The dotnet Tool

Thedotnettool is the Swiss Army knife of .NET Core development. It can be used for a lot of things, from running and creating new projects, to building them, adding NuGet references, running unit tests—you name it. It is installed with the .NET Core software development kit (SDK). Here, we will see some of the most useful commands that it has to offer.

By default,dotnetalways operates with the latest .NET Core version it can find. You can list all of the installed versions through the--infoargument, as follows:

          dotnet --info
        

Build

This tool can be used to build a project or a whole solution. The command used for the build isbuild, and the most typical arguments are the following ones:

  • <solution ...

Get Modern Web Development with ASP.NET Core 3 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.