dotnet-installer/Documentation/manpages/sdk/dotnet.1
2018-05-30 15:52:55 +00:00

646 lines
14 KiB
Groff

.\"t
.\" Automatically generated by Pandoc 2.2.1
.\"
.TH "dotnet command \- .NET Core CLI" "1" "" "" ".NET Core"
.hy
.SH dotnet command
.PP
.SH NAME
.PP
\f[C]dotnet\f[] \- General driver for running the command\-line commands.
.SH SYNOPSIS
.SS .NET Core 2.1
.IP
.nf
\f[C]
dotnet\ [command]\ [arguments]\ [\-\-additional\-deps]\ [\-\-additionalprobingpath]\ [\-d|\-\-diagnostics]\ [\-\-fx\-version]
\ \ \ \ [\-h|\-\-help]\ [\-\-info]\ [\-\-list\-runtimes]\ [\-\-list\-sdks]\ [\-\-roll\-forward\-on\-no\-candidate\-fx]\ [\-v|\-\-verbosity]\ [\-\-version]
\f[]
.fi
.SS .NET Core 2.0
.IP
.nf
\f[C]
dotnet\ [command]\ [arguments]\ [\-\-additional\-deps]\ [\-\-additionalprobingpath]\ [\-d|\-\-diagnostics]
\ \ \ \ [\-\-fx\-version]\ [\-h|\-\-help]\ [\-\-info]\ [\-\-roll\-forward\-on\-no\-candidate\-fx]\ [\-v|\-\-verbosity]\ [\-\-version]
\f[]
.fi
.SS .NET Core 1.x
.IP
.nf
\f[C]
dotnet\ [command]\ [arguments]\ [\-\-additionalprobingpath]\ [\-d|\-\-diagnostics]\ [\-\-fx\-version]
\ \ \ \ [\-h|\-\-help]\ [\-\-info]\ [\-v|\-\-verbosity]\ [\-\-version]
\f[]
.fi
.PP
* * * * *
.SH DESCRIPTION
.PP
\f[C]dotnet\f[] is a generic driver for the Command Line Interface (CLI) toolchain.
Invoked on its own, it provides brief usage instructions.
.PP
Each specific feature is implemented as a command.
To use the feature, the command is specified after \f[C]dotnet\f[], such as \f[C]dotnet\ build\f[].
All of the arguments following the command are its own arguments.
.PP
The only time \f[C]dotnet\f[] is used as a command on its own is to run framework\-dependent apps.
Specify an application DLL after the \f[C]dotnet\f[] verb to execute the application (for example, \f[C]dotnet\ myapp.dll\f[]).
.SH OPTIONS
.SS .NET Core 2.1
.PP
\f[C]\-\-additional\-deps\ <PATH>\f[]
.PP
Path to additional \f[I]deps.json\f[] file.
.PP
\f[C]\-\-additionalprobingpath\ <PATH>\f[]
.PP
Path containing probing policy and assemblies to probe.
.PP
\f[C]\-d|\-\-diagnostics\f[]
.PP
Enables diagnostic output.
.PP
\f[C]\-\-fx\-version\ <VERSION>\f[]
.PP
Version of the installed .NET Core runtime to use to run the application.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
If using with \f[C]dotnet\f[], it also prints a list of the available commands.
.PP
\f[C]\-\-info\f[]
.PP
Prints out detailed information about the CLI tooling and the environment, such as the current operating system, commit SHA for the version, and other information.
.PP
\f[C]\-\-list\-runtimes\f[]
.PP
Displays the installed .NET Core runtimes.
.PP
\f[C]\-\-list\-sdks\f[]
.PP
Displays the installed .NET Core SDKs.
.PP
\f[C]\-\-roll\-forward\-on\-no\-candidate\-fx\f[]
.PP
Rolls forward on no candidate shared framework.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Not supported in every command; see specific command page to determine if this option is available.
.PP
\f[C]\-\-version\f[]
.PP
Prints out the version of the .NET Core SDK in use.
.SS .NET Core 2.0
.PP
\f[C]\-\-additional\-deps\ <PATH>\f[]
.PP
Path to additional \f[I]deps.json\f[] file.
.PP
\f[C]\-\-additionalprobingpath\ <PATH>\f[]
.PP
Path containing probing policy and assemblies to probe.
.PP
\f[C]\-d|\-\-diagnostics\f[]
.PP
Enables diagnostic output.
.PP
\f[C]\-\-fx\-version\ <VERSION>\f[]
.PP
Version of the installed .NET Core runtime to use to run the application.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
If using with \f[C]dotnet\f[], it also prints a list of the available commands.
.PP
\f[C]\-\-info\f[]
.PP
Prints out detailed information about the CLI tooling and the environment, such as the current operating system, commit SHA for the version, and other information.
.PP
\f[C]\-\-roll\-forward\-on\-no\-candidate\-fx\f[]
.PP
Rolls forward on no candidate shared framework.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Not supported in every command; see specific command page to determine if this option is available.
.PP
\f[C]\-\-version\f[]
.PP
Prints out the version of the .NET Core SDK in use.
.SS .NET Core 1.x
.PP
\f[C]\-\-additionalprobingpath\ <PATH>\f[]
.PP
Path containing probing policy and assemblies to probe.
.PP
\f[C]\-d|\-\-diagnostics\f[]
.PP
Enables diagnostic output.
.PP
\f[C]\-\-fx\-version\ <VERSION>\f[]
.PP
Version of the installed .NET Core runtime to use to run the application.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
If using with \f[C]dotnet\f[], it also prints a list of the available commands.
.PP
\f[C]\-\-info\f[]
.PP
Prints out detailed information about the CLI tooling and the environment, such as the current operating system, commit SHA for the version, and other information.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Not supported in every command; see specific command page to determine if this option is available.
.PP
\f[C]\-\-version\f[]
.PP
Prints out the version of the .NET Core SDK in use.
.PP
* * * * *
.SS dotnet commands
.SS General
.SS .NET Core 2.1
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet build
T}@T{
Builds a .NET Core application.
T}
T{
dotnet build\-server
T}@T{
Interacts with servers started by a build.
T}
T{
dotnet clean
T}@T{
Clean build outputs.
T}
T{
dotnet help
T}@T{
Shows more detailed documentation online for the command.
T}
T{
dotnet migrate
T}@T{
Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project.
T}
T{
dotnet msbuild
T}@T{
Provides access to the MSBuild command line.
T}
T{
dotnet new
T}@T{
Initializes a C# or F# project for a given template.
T}
T{
dotnet pack
T}@T{
Creates a NuGet package of your code.
T}
T{
dotnet publish
T}@T{
Publishes a .NET framework\-dependent or self\-contained application.
T}
T{
dotnet restore
T}@T{
Restores the dependencies for a given application.
T}
T{
dotnet run
T}@T{
Runs the application from source.
T}
T{
dotnet sln
T}@T{
Options to add, remove, and list projects in a solution file.
T}
T{
dotnet store
T}@T{
Stores assemblies in the runtime package store.
T}
T{
dotnet test
T}@T{
Runs tests using a test runner.
T}
.TE
.SS .NET Core 2.0
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet build
T}@T{
Builds a .NET Core application.
T}
T{
dotnet clean
T}@T{
Clean build outputs.
T}
T{
dotnet help
T}@T{
Shows more detailed documentation online for the command.
T}
T{
dotnet migrate
T}@T{
Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project.
T}
T{
dotnet msbuild
T}@T{
Provides access to the MSBuild command line.
T}
T{
dotnet new
T}@T{
Initializes a C# or F# project for a given template.
T}
T{
dotnet pack
T}@T{
Creates a NuGet package of your code.
T}
T{
dotnet publish
T}@T{
Publishes a .NET framework\-dependent or self\-contained application.
T}
T{
dotnet restore
T}@T{
Restores the dependencies for a given application.
T}
T{
dotnet run
T}@T{
Runs the application from source.
T}
T{
dotnet sln
T}@T{
Options to add, remove, and list projects in a solution file.
T}
T{
dotnet store
T}@T{
Stores assemblies in the runtime package store.
T}
T{
dotnet test
T}@T{
Runs tests using a test runner.
T}
.TE
.SS .NET Core 1.x
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet build
T}@T{
Builds a .NET Core application.
T}
T{
dotnet clean
T}@T{
Clean build outputs.
T}
T{
dotnet migrate
T}@T{
Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project.
T}
T{
dotnet msbuild
T}@T{
Provides access to the MSBuild command line.
T}
T{
dotnet new
T}@T{
Initializes a C# or F# project for a given template.
T}
T{
dotnet pack
T}@T{
Creates a NuGet package of your code.
T}
T{
dotnet publish
T}@T{
Publishes a .NET framework\-dependent or self\-contained application.
T}
T{
dotnet restore
T}@T{
Restores the dependencies for a given application.
T}
T{
dotnet run
T}@T{
Runs the application from source.
T}
T{
dotnet sln
T}@T{
Options to add, remove, and list projects in a solution file.
T}
T{
dotnet test
T}@T{
Runs tests using a test runner.
T}
.TE
.PP
* * * * *
.SS Project references
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet add reference
T}@T{
Adds a project reference.
T}
T{
dotnet list reference
T}@T{
Lists project references.
T}
T{
dotnet remove reference
T}@T{
Removes a project reference.
T}
.TE
.SS NuGet packages
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet add package
T}@T{
Adds a NuGet package.
T}
T{
dotnet remove package
T}@T{
Removes a NuGet package.
T}
.TE
.SS NuGet commands
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet nuget delete
T}@T{
Deletes or unlists a package from the server.
T}
T{
dotnet nuget locals
T}@T{
Clears or lists local NuGet resources such as http\-request cache, temporary cache, or machine\-wide global packages folder.
T}
T{
dotnet nuget push
T}@T{
Pushes a package to the server and publishes it.
T}
.TE
.SS Global Tools commands
.PP
\&.NET Core Global Tools are available strating with .NET Core SDK 2.1.300:
.PP
.TS
tab(@);
l l.
T{
Command
T}@T{
Function
T}
_
T{
dotnet tool install
T}@T{
Installs a Global Tool on your machine.
T}
T{
dotnet tool list
T}@T{
Lists all Global Tools currently installed in the default directory on your machine or in the specified path.
T}
T{
dotnet tool uninstall
T}@T{
Uninstalls a Global Tool from your machine.
T}
T{
dotnet tool update
T}@T{
Updates a Global Tool on your machine.
T}
.TE
.SS Additional tools
.PP
Starting with .NET Core SDK 2.1.300, a number of tools that were available only on a per project basis using \f[C]DotnetCliToolReference\f[] are now available as part of the .NET Core SDK.
These tools include:
.PP
.TS
tab(@);
l l.
T{
Tool
T}@T{
Function
T}
_
T{
dev\-certs
T}@T{
Creates and manages development certificates.
T}
T{
ef
T}@T{
Entity Framework Core command\-line tools.
T}
T{
sql\-cache
T}@T{
SQL Server cache command\-line tools.
T}
T{
user\-secrets
T}@T{
Manages development user secrets.
T}
T{
watch
T}@T{
Starts a file watcher that runs a command when files change.
T}
.TE
.PP
For more information about each tool, execute \f[C]dotnet\ <tool\-name>\ \-\-help\f[].
.SH EXAMPLES
.PP
Creates a new .NET Core console application:
.PP
\f[C]dotnet\ new\ console\f[]
.PP
Restore dependencies for a given application:
.PP
\f[C]dotnet\ restore\f[]
.PP
.PP
Build a project and its dependencies in a given directory:
.PP
\f[C]dotnet\ build\f[]
.PP
Run a framework\-dependent app named \f[C]myapp.dll\f[]:
.PP
\f[C]dotnet\ myapp.dll\f[]
.SH ENVIRONMENT VARIABLES
.SS .NET Core 2.1
.PP
\f[C]DOTNET_PACKAGES\f[]
.PP
The primary package cache.
If not set, it defaults to \f[C]$HOME/.nuget/packages\f[] on Unix or \f[C]%HOME%\\NuGet\\Packages\f[] on Windows.
.PP
\f[C]DOTNET_SERVICING\f[]
.PP
Specifies the location of the servicing index to use by the shared host when loading the runtime.
.PP
\f[C]DOTNET_CLI_TELEMETRY_OPTOUT\f[]
.PP
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
Set to \f[C]true\f[] to opt\-out of the telemetry feature (values \f[C]true\f[], \f[C]1\f[], or \f[C]yes\f[] accepted).
Otherwise, set to \f[C]false\f[] to opt into the telemetry features (values \f[C]false\f[], \f[C]0\f[], or \f[C]no\f[] accepted).
If not set, the default is \f[C]false\f[] and the telemetry feature is active.
.PP
\f[C]DOTNET_MULTILEVEL_LOOKUP\f[]
.PP
Specifies whether .NET Core runtime, shared framework, or SDK are resolved from the global location.
If not set, it defaults to \f[C]true\f[].
Set to \f[C]false\f[] to not resolve from the global location and have isolated .NET Core installations (values \f[C]0\f[] or \f[C]false\f[] are accepted).
For more information about multi\-level lookup, see Multi\-level SharedFX Lookup.
.PP
\f[C]DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX\f[]
.PP
Disables minor version roll forward.
For more information, see Roll forward.
.SS .NET Core 2.0
.PP
\f[C]DOTNET_PACKAGES\f[]
.PP
The primary package cache.
If not set, it defaults to \f[C]$HOME/.nuget/packages\f[] on Unix or \f[C]%HOME%\\NuGet\\Packages\f[] on Windows.
.PP
\f[C]DOTNET_SERVICING\f[]
.PP
Specifies the location of the servicing index to use by the shared host when loading the runtime.
.PP
\f[C]DOTNET_CLI_TELEMETRY_OPTOUT\f[]
.PP
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
Set to \f[C]true\f[] to opt\-out of the telemetry feature (values \f[C]true\f[], \f[C]1\f[], or \f[C]yes\f[] accepted).
Otherwise, set to \f[C]false\f[] to opt into the telemetry features (values \f[C]false\f[], \f[C]0\f[], or \f[C]no\f[] accepted).
If not set, the default is \f[C]false\f[] and the telemetry feature is active.
.PP
\f[C]DOTNET_MULTILEVEL_LOOKUP\f[]
.PP
Specifies whether .NET Core runtime, shared framework, or SDK are resolved from the global location.
If not set, it defaults to \f[C]true\f[].
Set to \f[C]false\f[] to not resolve from the global location and have isolated .NET Core installations (values \f[C]0\f[] or \f[C]false\f[] are accepted).
For more information about multi\-level lookup, see Multi\-level SharedFX Lookup.
.SS .NET Core 1.x
.PP
\f[C]DOTNET_PACKAGES\f[]
.PP
The primary package cache.
If not set, it defaults to \f[C]$HOME/.nuget/packages\f[] on Unix or \f[C]%HOME%\\NuGet\\Packages\f[] on Windows.
.PP
\f[C]DOTNET_SERVICING\f[]
.PP
Specifies the location of the servicing index to use by the shared host when loading the runtime.
.PP
\f[C]DOTNET_CLI_TELEMETRY_OPTOUT\f[]
.PP
Specifies whether data about the .NET Core tools usage is collected and sent to Microsoft.
Set to \f[C]true\f[] to opt\-out of the telemetry feature (values \f[C]true\f[], \f[C]1\f[], or \f[C]yes\f[] accepted).
Otherwise, set to \f[C]false\f[] to opt into the telemetry features (values \f[C]false\f[], \f[C]0\f[], or \f[C]no\f[] accepted).
If not set, the default is \f[C]false\f[] and the telemetry feature is active.
.PP
* * * * *
.SH AUTHORS
mairaw.