dotnet CLI
The dotnet command-line tool that creates, restores, builds, runs, tests and publishes .NET projects.
In more detail
Every task in this course starts from it: dotnet new scaffolds a project, dotnet run builds and starts it, and dotnet test runs tests. dotnet --version shows which SDK it will use, and dotnet --list-sdks and dotnet --list-runtimes show everything installed.
Examples
dotnet --versiondotnet --list-sdksdotnet --list-runtimesRelated terms
- SDK — A software development kit: a bundle of tools, libraries and documentation for building software against a platform or service.
- dotnet new — The dotnet command that creates a new project, solution or file from a template, such as a console app or a web API.
- dotnet run — The dotnet command that restores, builds and then starts a project in one step.
- dotnet build — The dotnet command that compiles a project or solution and its dependencies into assemblies.
- dotnet test — The dotnet command that builds test projects and runs their tests, reporting passes and failures.
- dotnet publish — The dotnet command that compiles an app and gathers everything needed to run it into a folder or container image, ready to deploy.
- command-line interface — A program you control by typing commands as text in a terminal instead of clicking in a window.
Taught in
- What is .NET? Runtime vs SDK, and LTS vs STS — Modern .NET Core, C# & Enterprise Microservices
- Solutions, Projects, and Target Frameworks — Modern .NET Core, C# & Enterprise Microservices
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices
- Unit Testing with xUnit and NSubstitute — Modern .NET Core, C# & Enterprise Microservices
- OpenTelemetry, Container Publishing and Trimming — Modern .NET Core, C# & Enterprise Microservices