.NET SDK and dotnet CLI

This section documents MSBuild 18.9, the .NET SDK 10.0.402 (with its dotnet CLI) and NuGet 7.9, as published in the MSBuild, .NET and NuGet documentation on learn.microsoft.com, which is the reference these pages are written and verified against. Material about .NET 11 / NuGet 8.0 is still in preview and is always flagged as such — never presented as baseline.

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

The C# Reference bibliography lists the reference material consulted while preparing these pages.

The .NET SDK is what developers install to build .NET code: the dotnet command-line interface, MSBuild, the C#, F# and Visual Basic compilers, the NuGet client, the project templates and the MSBuild SDKs (Microsoft.NET.Sdk and friends). The .NET runtime is what runs the result; an SDK carries one runtime, and a machine can hold several of each. This group documents the SDK and its CLI at .NET SDK 10.0.402 (2026-10-13, runtime 10.0.13). .NET 10 is an LTS release, supported until 2028-11-14. The introduction in the C# Reference is Build and Tooling.

The command structure

Every invocation is driver, command, arguments and options:

dotnet build src/Ledgerline/Ledgerline.csproj --configuration Release
#  ^      ^             ^                          ^
#  driver command       argument                   option

The driver (dotnet, also called the muxer) has two jobs. Given a path to a .dll it runs an application (dotnet app.dll); given a command it selects an SDK — the newest installed, or the one global.json asks for (Installing and Selecting SDKs) — and runs the command from that SDK. dotnet --help shows both halves; the SDK commands of 10.0.402 are:

SDK commands:
  build             Build a .NET project.
  build-server      Interact with servers started by a build.
  clean             Clean build outputs of a .NET project.
  format            Apply style preferences to a project or solution.
  help              Opens the reference page in a browser for the specified command.
  msbuild           Run Microsoft Build Engine (MSBuild) commands.
  new               Create a new .NET project or file.
  nuget             Provides additional NuGet commands.
  pack              Create a NuGet package.
  package           Search for, add, remove, or list PackageReferences for a .NET project.
  publish           Publish a .NET project for deployment.
  reference         Add, remove, or list ProjectReferences for a .NET project.
  restore           Restore dependencies specified in a .NET project.
  run               Build and run a .NET project output.
  sdk               Manage .NET SDK installation.
  solution          Modify Visual Studio solution files.
  store             Store the specified assemblies in the runtime package store.
  test              Run unit tests using the test runner specified in a .NET project.
  tool              Install or manage tools that extend the .NET experience.
  vstest            Run Microsoft Test Engine (VSTest) commands.
  workload          Manage optional workloads.

Additional commands from bundled tools:
  dev-certs         Create and manage development certificates.
  fsi               Start F# Interactive / execute F# scripts.
  user-jwts         Manage JSON Web Tokens in development.
  user-secrets      Manage development user secrets.
  watch             Start a file watcher that runs a command when files change.

The .NET 10 SDK lists commands noun first (dotnet package add, dotnet reference add); the older verb-first forms (dotnet add package) still work but no longer appear in the help (Solutions, References and Packages).

The command groups

Group Commands Page

Basic

new, restore, build, run, test, pack, publish, clean, format, watch, sln/solution, store, help, vstest

the pages below, one per task

Project modification

package add/list/remove/search/update/download, reference add/list/remove, project convert

Solutions, References and Packages

NuGet

nuget push/delete/locals/add source/…/verify/trust/sign/why

dotnet package and nuget Commands

Workloads

workload install/update/list/search/repair/restore/clean/config/history/uninstall

Workloads

Advanced

sdk check, msbuild, build-server, dev-certs

MSBuild, Installing and Selecting SDKs

Tools

tool install/list/update/restore/run/uninstall/search/exec, dnx

.NET Tools

What is installed

dotnet --info is the first thing to paste into a bug report: the SDK in use and its MSBuild, the workload state, the host, every SDK and runtime, and the DOTNET_* variables that are set.

dotnet --info
.NET SDK:
 Version:           10.0.402
 Commit:            a8dd0577c5
 Workload version:  10.0.400-manifests.da132f47
 MSBuild version:   18.9.15+a8dd0577c

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  24.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   ~/.dotnet/sdk/10.0.402/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
  Version:      10.0.13
  Architecture: x64
  Commit:       4099f83977

.NET SDKs installed:
  9.0.319 [~/.dotnet/sdk]
  10.0.402 [~/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.21 [~/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 10.0.13 [~/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.32 [~/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.21 [~/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 10.0.13 [~/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_CLI_TELEMETRY_OPTOUT              [1]
  DOTNET_NOLOGO                            [1]

dotnet --list-sdks, dotnet --list-runtimes and dotnet --version print one part each and are easier to parse in scripts. Note the two different "versions": the SDK (10.0.402) and the host/runtime (10.0.13).

Baseline and release history

SDK Change

.NET 8

--getProperty/--getItem/--getTargetResult; the artifacts output layout (UseArtifactsOutput); dotnet pack and dotnet publish default to Release; the portable RID graph; Source Link built in; dotnet workload clean; Terminal Logger opt-in

.NET 9

Terminal Logger on by default; workload sets, dotnet workload config/history; BuildCheck; NuGetAudit transitive warnings (reverted to direct in 9.0.101)

.NET 10

dotnet new sln creates .slnx; file-based apps (dotnet run app.cs); dotnet tool exec/dnx and RID-specific, self-contained and AOT tools; noun-first commands; Microsoft.Testing.Platform in dotnet test; dotnet completions script; global.json paths, errorMessage and test.runner; --cli-schema; container images from console apps; package pruning; dotnet package update

10.0.2xx

dotnet package download

10.0.4xx

deterministic dotnet pack (opt-in) — this group’s baseline is 10.0.402

.NET 11 (preview)

MSBuild Server and the NativeAOT CLI host on by default; .slnf from the CLI; #:include in file-based apps; DOTNET_TEST_RUNNER; OpenTelemetry CLI telemetry; reproducible container digests; NETSDK1235

Details, links and support dates are on Versions and Release History. Where a page mentions .NET 11 it refers to SDK 11.0.100-rc.2, a go-live release candidate.