Įvykiai
03-17 23 - 03-21 23
Prisijunkite prie meetup serijos, kad sukurtumėte keičiamo dydžio DI sprendimus, pagrįstus realaus pasaulio naudojimo atvejais, su kolegomis kūrėjais ir ekspertais.
Registruotis dabarŠi naršyklė nebepalaikoma.
Atnaujinkite į „Microsoft Edge“, kad pasinaudotumėte naujausiomis funkcijomis, saugos naujinimais ir techniniu palaikymu.
This article applies to: ✔️ .NET Core 3.1 SDK and later versions
The .NET command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing .NET applications.
The .NET CLI is included with the .NET SDK. For more information about how to install the .NET SDK, see Install .NET. After installing the SDK, you can run CLI commands by opening a terminal and entering the commands at the terminal prompt.
CLI command structure consists of the driver ("dotnet"), the command, and possibly command arguments and options. You see this pattern in most CLI operations, such as creating a new console app, and running it from the command line. The following commands show when the console app was run from a directory named my_app:
dotnet new console
dotnet build --output ./build_output
dotnet ./build_output/my_app.dll
The driver is named dotnet and has two responsibilities, either running a framework-dependent app or executing a command.
To run a framework-dependent app, specify the path to the app's .dll file after the driver without specifying a command, for example, dotnet /path/to/my_app.dll
. When executing the command from the folder where the app's DLL resides, just execute dotnet my_app.dll
. For more information, see the dotnet command.
When you supply a command to the driver, dotnet.exe
starts the CLI command execution process. For example:
dotnet build
First, the driver determines the version of the SDK to use. If there's no global.json file, the latest version of the SDK available is used. After the SDK version is determined, it executes the command.
The command performs an action. For example, dotnet build
builds code. dotnet publish
publishes code. See the CLI commands section for a list of commands.
The arguments you pass on the command line are the arguments to the command invoked or to options specified with the command. For example, when you execute dotnet publish my_app.csproj
, the my_app.csproj
argument indicates the project to publish and is passed to the publish
command.
The options you pass on the command line are the options to the command invoked. For example, when you execute dotnet publish --output /build_output
, the --output
option and its value provided by the /build_output
argument are passed to the publish
command.
The following commands are installed by default:
new
restore
build
publish
run
test
vstest
pack
migrate
clean
sln
help
store
watch
format
(Available since .NET 6 SDK)nuget delete
nuget locals
nuget push
nuget add source
(Available since .NET Core 3.1.200 SDK)nuget disable source
(Available since .NET Core 3.1.200 SDK)nuget enable source
(Available since .NET Core 3.1.200 SDK)nuget list source
(Available since .NET Core 3.1.200 SDK)nuget remove source
(Available since .NET Core 3.1.200 SDK)nuget update source
(Available since .NET Core 3.1.200 SDK)nuget verify
(Available since .NET 5 SDK)nuget trust
(Available since .NET 5 SDK)nuget sign
(Available since .NET 6 SDK)package search
(Available since .NET 8.0.2xx SDK)nuget why
(Available since .NET 8.0.4xx SDK)workload
(Available since .NET 7 SDK)workload config
(Available since .NET 8.0.400 SDK)workload install
(Available since .NET 6 SDK)workload list
(Available since .NET 6 SDK)workload update
(Available since .NET 6 SDK)workload restore
(Available since .NET 6 SDK)workload repair
(Available since .NET 6 SDK)workload uninstall
(Available since .NET 6 SDK)workload search
(Available since .NET 6 SDK)Tools are console applications that are installed from NuGet packages and are invoked from the command prompt. You can write tools yourself or install tools written by third parties. Tools are also known as global tools, tool-path tools, and local tools. For more information, see .NET tools overview.
.NET atsiliepimas
.NET yra atvirojo kodo projektas. Pasirinkite saitą, kad pateiktumėte atsiliepimą:
Įvykiai
03-17 23 - 03-21 23
Prisijunkite prie meetup serijos, kad sukurtumėte keičiamo dydžio DI sprendimus, pagrįstus realaus pasaulio naudojimo atvejais, su kolegomis kūrėjais ir ekspertais.
Registruotis dabarMokymas
Modulis
Publish an ASP.NET Core app - Training
Learn how to publish an ASP.NET Core app for deployment to a web server or cloud service.
Sertifikatas
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
Dokumentacija
Learn about the dotnet command (the generic driver for the .NET CLI) and its usage.
Select which .NET version to use - .NET
Learn how .NET automatically finds and chooses runtime versions for your program. Additionally, this article teaches you how to force a specific version.
dotnet help command - .NET CLI
The dotnet help command shows more detailed documentation online for the specified command.