“NET Core CLI Tool Document” (6) dotnet command

Time:2019-4-22

Note: This article is a personal translation of articles, due to limited personal level, there are some wrong places for you to help correct.
Original: dotnet command
Translator: dotnet command

Name

Dotnet — General Driver for Running Command Line Commands

outline

dotnet [--version] [--help] [--verbose] [--info] <command> [<args>]

describe

dotnetCommand Line Interface (CLI) is a general driver for the tool chain. Call it yourself and give a brief description of how to use it.

Each specific function is implemented as a command. To use this function, commands are specified indotnetLater, for exampledotnet build。 All the parameters that follow the command are their own views.

dotnetAs your only command is to run portable applications. Only one portable application DLL is specified in dotnet The application is executed after the verb.

option

-v, --verbose
Detailed output is available.

--version
Print out the CLI tool version.

--info
Print out more detailed information about CLI tools, such as the current operating system, the submitted version of SHA, and so on.

-h, --help
Print out a short list of help and current commands.

DOTNET command

Dotnet has the following commands:

  • dotnet-new

    • Initialize a C # or F # console application.

  • dotnet-restore

    • Restore the dependencies of a given application.

  • dotnet-build

    • Generate a. NET Core application.

  • dotnet-publish

    • Publish a portable or stand-alone. NET application.

  • dotnet-run

    • Run the application from source code.

  • dotnet-test

    • Run the test using a test machine specified in project. json.

  • dotnet-pack

    • Create a NuGet package for your code.

Example

dotnet new
Initialize a. NET Core sample console application that can be compiled and run.

dotnet restore
Restore the dependencies of a given application.

dotnet compile
Compile applications in a given directory.

dotnet myapp.dll
Run a name calledmyapp.dllPortable applications.

environment variable

DOTNET_PACKAGES

Major package caching. If not, it defaults to $HOME/.nuget/packages on Unix or% HOME% NuGetPackages on Windows.

DOTNET_SERVICING

Specifies the location of the service index used to share the hosts at load runtime.

DOTNET_CLI_TELEMETRY_OPTOUT

Specifies whether usage data about the. NET Core tool is collected and sent to Microsoft.trueThe selected telemetry function (value is true, 1 or yes is acceptable); otherwise,false(Value false, 0 or no is acceptable). If not, the default isfalseTherefore, the telemetry function is turned on.

Recommended Today

Comparison and analysis of Py = > redis and python operation redis syntax

preface R: For redis cli P: Redis for Python get ready pip install redis pool = redis.ConnectionPool(host=’39.107.86.223′, port=6379, db=1) redis = redis.Redis(connection_pool=pool) Redis. All commands I have omitted all the following commands. If there are conflicts with Python built-in functions, I will add redis Global command Dbsize (number of returned keys) R: dbsize P: print(redis.dbsize()) […]