Programming is the art of telling another human being what one wants the computer to do.
.NET CLI cheatsheet
Created2025-12-24
This guide explains the most important dotnet commands, grouped logically. You do not need to memorize everything — learn the structure and look up details when needed.
Mental Model
Think of dotnet as a Swiss Army knife with 5 main categories:
SDK & environment info
Project creation & structure
Build & run (development)
Publish & distribution
Tools & advanced commands
SDK & Environment Information
dotnet --info
Shows:
Installed SDKs
Installed runtimes
OS & architecture
1
dotnet --info
dotnet --version
Shows the currently active SDK version.
1
dotnet --version
dotnet --list-sdks
Lists all installed SDKs.
1
dotnet --list-sdks
dotnet --list-runtimes
Lists all installed runtimes.
1
dotnet --list-runtimes
Project Creation
dotnet new
Lists available templates.
1
dotnet new
Common templates
1 2 3 4
dotnet new console # Console application dotnet new webapi # ASP.NET Core Web API dotnet new classlib # Class Library dotnet new sln # Solution file