Understanding dotnet Command

Learn about the .NET Command-Line Interface (CLI) named dotnet.

When we install the .NET SDK, it includes a command-line interface (CLI) named dotnet.

Creating new projects

The .NET CLI has commands that work on the current folder to create a new project using templates:

Step 1: On Windows, start “Command Prompt” or “Windows Terminal.” On macOS, start “Terminal.” If you are using Visual Studio Code, you can use the integrated terminal.

Step 2: Enter the dotnet new list (.NET 7), or dotnet new --list or dotnet new -l (.NET 6) command to list currently installed templates, as shown in the figure

Get hands-on with 1400+ tech skills courses.