dotnet(1)
dotnet(1) π .NET Documentation
okay bestie, grab a boba, we're doing this π§β¨
This article applies to: βοΈ .NET 6 SDK and later versions
β¨ NAME β¨
dotnet β the generic driver for the .NET CLI. she's the main character, fr fr π
β¨ SYNOPSIS β¨
<h3>To get information about the available commands and the environment:</h3>
dotnet [--version] [--info] [--list-runtimes] [--list-sdks]
dotnet -h|--help
<h3>To run a command (requires SDK installation):</h3>
dotnet <COMMAND> [-d|--diagnostics] [-h|--help] [--verbosity <LEVEL>]
[command-options] [arguments]
<h3>To run an application:</h3>
dotnet [--additionalprobingpath <PATH>] [--additional-deps <PATH>]
[--fx-version <VERSION>] [--roll-forward <SETTING>]
<PATH_TO_APPLICATION> [arguments]
dotnet exec [--additionalprobingpath <PATH>] [--additional-deps <PATH>]
[--depsfile <PATH>]
[--fx-version <VERSION>] [--roll-forward <SETTING>]
[--runtimeconfig <PATH>]
<PATH_TO_APPLICATION> [arguments]
β¨ DESCRIPTION β¨
so dotnet is literally doing two jobs at once and she's slaying both π
- She gives you commands for working with .NET projects.
Like, dotnet build builds a project. Every command defines its own options and arguments. And no cap β all commands support the --help option, which prints out brief documentation about how to use the command. π«Ά
- She runs .NET applications.
You give her the path to an application .dll file and she runs it. "To run the application" means to find and execute the entry point, which for console apps is the Main method. So for example, dotnet myapp.dll runs the myapp application. Want the tea on deployment? Go look at .NET application deployment to learn about deployment options. π
β¨ OPTIONS β¨
Different options are available for:
- Displaying information about the environment. π
- Running a command. πββοΈ
- Running an application. π
πΈ Options for displaying environment information and available commands
These ones are available when dotnet is used by herself, without specifying a command or an application to run. Like dotnet --info or dotnet --version. They print out info about the environment. π«
--infoβ Prints out detailed information about a .NET installation and the machine environment, such as the current operating system, and commit SHA of the .NET version. receipts, basically π§Ύ--versionβ Prints out the version of the .NET SDK used bydotnetcommands, which may be affected by aglobal.jsonfile. Available only when the SDK is installed. π--list-runtimes [--arch <ARCH>]β Prints out a list of the installed .NET runtimes for the architecture of the invokeddotnet. An x86 version ofdotnetlists only x86 runtimes, and an x64 version ofdotnetlists only x64 runtimes.
.NET 10 and later versions support the --arch argument. If specified and not the same as the dotnet architecture, searches for a .NET installation of the specified architecture and prints out any runtimes installed there. Allowed values include arm64, x64, and x86. The dotnet/runtime repo has the full list of valid architecture values (https://github.com/dotnet/runtime/blob/1713d65316467e3eaf23514b6642eba5869f1b70/src/native/corehost/hostmisc/utils.cpp#L194-L205). π
--list-sdks [--arch <ARCH>]β Prints out a list of the installed .NET SDKs for the architecture of the invokeddotnet. An x86 version ofdotnetlists only x86 SDKs, and an x64 version ofdotnetlists only x64 SDKs.
.NET 10 and later versions support the --arch argument. If specified and not the same as the dotnet architecture, searches for a .NET installation of the specified architecture and prints out any SDKs installed there. Allowed values include arm64, x64, and x86. The dotnet/runtime repo has the full list of valid architecture values (https://github.com/dotnet/runtime/blob/1713d65316467e3eaf23514b6642eba5869f1b70/src/native/corehost/hostmisc/utils.cpp#L194-L205). π
-?|-h|--helpβ Prints out a list of available commands. the "what can u even do" button π
πΈ Options for running a command
These ones are for dotnet with a command. Like dotnet build --help or dotnet build --verbosity diagnostic. π οΈ
-d|--diagnosticsβ Enables diagnostic output. π¬-v|--verbosity <LEVEL>β Sets the verbosity level of the command. Allowed values areq[uiet],m[inimal],n[ormal],d[etailed], anddiag[nostic]. Not supported in every command. See specific command page to determine if this option is available. iykyk, check first π«£-?|-h|--helpβ Prints out documentation for a given command. For example,dotnet build --helpdisplays help for thebuildcommand. π‘- command options β Each command defines options specific to that command. See specific command page for a list of available options. π
πΈ Options for running an application
These ones are available when dotnet runs an application. For example, dotnet --roll-forward Major myapp.dll. π
--additionalprobingpath <PATH>β Path containing probing policy and assemblies to probe. Repeat the option to specify multiple paths. π--additional-deps <PATH>β Path to an additional.deps.jsonfile. Adeps.jsonfile contains a list of dependencies, compilation dependencies, and version information used to address assembly conflicts. For more information, see Runtime Configuration Files (https://github.com/dotnet/sdk/blob/main/documentation/specs/runtime-configuration-file.md) on GitHub. π--roll-forward <SETTING>β Controls how roll forward is applied to the app. The SETTING can be one of the following values. If not specified,Minoris the default. ποΈLatestPatchβ Roll forward to the highest patch version. This disables minor version roll forward.Minorβ Roll forward to the lowest higher minor version, if requested minor version is missing. If the requested minor version is present, then theLatestPatchpolicy is used.Majorβ Roll forward to lowest higher major version, and lowest minor version, if requested major version is missing. If the requested major version is present, then theMinorpolicy is used.LatestMinorβ Roll forward to highest minor version, even if requested minor version is present. Intended for component hosting scenarios.LatestMajorβ Roll forward to highest major and highest minor version, even if requested major is present. Intended for component hosting scenarios.Disableβ Don't roll forward. Only bind to specified version. This policy isn't recommended for general use because it disables the ability to roll forward to the latest patches. This value is only recommended for testing.
With the exception of Disable, all settings will use the highest available patch version. β¨
Roll forward behavior can also be configured in a project file property, a runtime configuration file property, and an environment variable. For more information, see Major-version runtime roll forward. π§
--fx-version <VERSION>β Version of the .NET runtime to use to run the application.
β οΈ bestie listen β this option overrides the version of the first framework reference in the application's .runtimeconfig.json file. This means it only works as expected if there's just one framework reference. If the application has more than one framework reference, using this option may cause errors. do not ignore this one, I'm serious π
πΈ Options for running an application with the exec command
These ones are available only when dotnet runs an application by using the exec command. For example, dotnet exec --runtimeconfig myapp.runtimeconfig.json myapp.dll. π§
--depsfile <PATH>β Path to adeps.jsonfile. Adeps.jsonfile is a configuration file that contains information about dependencies necessary to run the application. This file is generated by the .NET SDK. π§Ύ--runtimeconfig <PATH>β Path to aruntimeconfig.jsonfile. Aruntimeconfig.jsonfile contains run-time settings and is typically named<applicationname>.runtimeconfig.json. For more information, see .NET runtime configuration settings. βοΈ
πΈ dotnet commands
π General
dotnet buildβ Builds a .NET application.dotnet build-serverβ Interacts with servers started by a build.dotnet cleanβ Clean build outputs.dotnet execβ Runs a .NET application.dotnet helpβ Shows more detailed documentation online for the command.dotnet msbuildβ Provides access to the MSBuild command line.dotnet newβ Initializes a C# or F# project for a given template.dotnet packβ Creates a NuGet package of your code.dotnet publishβ Publishes a .NET framework-dependent or self-contained application.dotnet restoreβ Restores the dependencies for a given application.dotnet runβ Runs the application from source.dotnet sdk checkβ Shows up-to-date status of installed SDK and Runtime versions.dotnet slnβ Options to add, remove, and list projects in a solution file.dotnet storeβ Stores assemblies in the runtime package store.dotnet testβ Runs tests using a test runner.
π Project references
dotnet reference addβ Adds a project reference.dotnet reference listβ Lists project references.dotnet reference removeβ Removes a project reference.
π NuGet packages
dotnet package addβ Adds a NuGet package.dotnet package listβ Lists NuGet packages.dotnet package removeβ Removes a NuGet package.dotnet package searchβ Searches for a NuGet package.
πΈ NuGet commands
the package-handling girlies, all of them, right here:
dotnet nuget deleteβ deletes a package from the server, or unlists it (yes babe, unlisting is a whole vibe)dotnet nuget pushβ pushes your package up to the server and publishes it, no capdotnet nuget localsβ clears or lists your local NuGet resources, like the http-request cache, the temporary cache, or the machine-wide global packages folder π§Ήdotnet nuget add sourceβ adds a NuGet sourcedotnet nuget disable sourceβ disables a NuGet sourcedotnet nuget enable sourceβ enables a NuGet sourcedotnet nuget list sourceβ lists every NuGet source you've configureddotnet nuget remove sourceβ removes a NuGet sourcedotnet nuget update sourceβ updates a NuGet source
π¦ Workload commands
dotnet workload cleanβ removes workload componentsdotnet workload configβ enables or disables workload-set update modedotnet workload historyβ shows all the workload installation actions that happeneddotnet workload installβ installs an optional workloaddotnet workload listβ lists all installed workloadsdotnet workload repairβ repairs all installed workloadsdotnet workload restoreβ restores the workloads a project needsdotnet workload searchβ lists selected workloads, or all the available onesdotnet workload uninstallβ uninstalls a workloaddotnet workload updateβ reinstalls all installed workloads
π Global, tool-path, and local tools commands
okay so tools are literally console applications that get installed from NuGet packages and then invoked straight from the command prompt. You can write your own tools or install tools that third parties wrote β both are valid, both are iconic. These are also known as global tools, tool-path tools, and local tools. Want the full lore? See the .NET tools overview.
dotnet tool installβ installs a tool on your machinedotnet tool listβ lists all the global, tool-path, or local tools currently installed on your machinedotnet tool searchβ searches NuGet.org for tools that have your specified search term in their name or metadata πdotnet tool uninstallβ uninstalls a tool from your machinedotnet tool updateβ updates a tool that's installed on your machine
β¨ Additional tools
The following additional tools ship as part of the .NET SDK:
dev-certsβ creates and manages development certificatesefβ Entity Framework Core command-line toolsuser-secretsβ manages development user secretswatchβ a file watcher that restarts or hot reloads an application when it detects changes in the source code
For more info on any of these, just type dotnet <tool-name> --help. π«Ά
π EXAMPLES
Create a new .NET console application:
dotnet new console
Build a project and its dependencies in a given directory:
dotnet build
Run an application:
dotnet exec myapp.dll
dotnet myapp.dll
π SEE ALSO
- Environment variables used by .NET SDK, .NET CLI, and .NET runtime
- Runtime Configuration Files (https://github.com/dotnet/sdk/blob/main/documentation/specs/runtime-configuration-file.md)
- .NET runtime configuration settings
and that's the whole page bestie, we ate and left no crumbs πβ¨ this one's from the 2025-10-30 era of dotnet(1) β go forth, run your commands, and slay ππ
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms