dotnet -- General driver for running the command-line commands
dotnet [--version] [--verbose] [--info] [command] [arguments] [--help]
dotnet is a generic driver for the Command Line Interface (CLI) toolchain. Invoked on its own, it will give out brief usage instructions.
Each specific feature is implemented as a command. In order to use the feature, the command is specified after
dotnet, such as
dotnet build. All of the arguments following the command are its own arguments.
The only time
dotnet is used as a command on its own is to run portable apps. Just specify a portable application DLL after the
dotnet verb to execute the application.
Enables verbose output.
Prints out the version of the CLI tooling.
Prints out more detailed information about the CLI tooling, such as the current operating system, commit SHA for the version, etc.
Prints out a short help for the command. If using with
dotnet only, it also prints a list of the available commands.
The following commands exist for dotnet:
- Initializes a C# or F# console application project.
- Restores the dependencies for a given application.
- Builds a .NET Core application.
- Publishes a .NET portable or self-contained application.
- Runs the application from source.
- Runs tests using a test runner specified in the project.json.
- Creates a NuGet package of your code.
Initialize a sample .NET Core console application that can be compiled and run:
Restore dependencies for a given application:
Build a project and its dependencies in a given directory:
Run a portable app named
The primary package cache. If not set, it defaults to $HOME/.nuget/packages on Unix or %HOME%\NuGet\Packages on Windows.
Specifies the location of the servicing index to use by the shared host when loading the runtime.
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
true to opt-out of the telemetry feature (values true, 1 or yes accepted); otherwise,
false (values false, 0 or no accepted). If not set, it defaults to
false, that is, the telemetry feature is on.