The dotnet CLI
In this page:
The dotnet CLI
The dotnet command-line tool creates, builds, and runs C# projects without needing an IDE. dotnet new console scaffolds a runnable console project, dotnet build compiles it, and dotnet run builds and executes it in one step. This tool is the standard entry point for .NET development on any platform.
Note: dotnet run rebuilds automatically if source files changed since the last build.
Example: The dotnet CLI
# Create a new console project in the current folder
dotnet new console -o HelloApp
cd HelloApp
# Build without running
dotnet build
# Build and run in one step
dotnet run
⚠️ Run this command in your terminal.
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: