id = "dotnet" name = ".NET CLI" homepage = "https://learn.microsoft.com/en-us/dotnet/core/tools/" description = "The .NET command-line interface (CLI) is a cross-platform toolchain for developing, building, running, and publishing .NET applications." icon = "SimpleIcons:dotnet" executables = ["dotnet"] [dotfiles] # https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior # — the user-level NuGet.Config every `dotnet restore`, `dotnet package add` # and `dotnet nuget` reads and, by default, writes: "Windows: # %appdata%\NuGet\NuGet.Config Mac/Linux: ~/.config/NuGet/NuGet.Config or # ~/.nuget/NuGet/NuGet.Config (varies by tooling)". The same page settles which # of the two Unix spellings belongs here: ".NET CLI uses ~/.nuget/NuGet folder, # while Mono uses ~/.config/NuGet folder" — so ~/.config/NuGet is Mono's and # NuGet.exe's, not this entry's. paths = [ "~/.nuget/NuGet/NuGet.Config", "%APPDATA%/NuGet/NuGet.Config", ] # The global packages folder (extracted packages, gigabytes of them) and the # CLI's own home: first-use sentinels and the binaries of installed global # tools. Neither is configuration. exclude = [ "~/.nuget/packages/", "~/.dotnet/", ] # No whole-file credential: NuGet.Config is mostly package sources. secret = [] # Read once per command invocation. side_effect = false # `packageSourceCredentials` holds the password for a private feed, either as # `ClearTextPassword` or as the machine-encrypted `Password` # (https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file). # NuGet.Config is XML, which this catalog's key_path syntax does not parse, so # these are prefix rules — NuGet writes one `` element per line. # Both spellings, or the password is only lifted out on Unix. [[dotfiles.secret_paths]] file = ["~/.nuget/NuGet/NuGet.Config", "%APPDATA%/NuGet/NuGet.Config"] match = { prefix = ["...] [options] Arguments: The project or solution or C# (file-based program) file to operate on. If a file is not specified, the command will search the current directory for a project or solution. Options: --ucr, --use-current-runtime Use current runtime as the target runtime. [default: False] -f, --framework The target framework to build for. The target framework must also be specified in the project file. -c, --configuration The configuration to use for building the project. The default for most projects is 'Debug'. --version-suffix Set the value of the $(VersionSuffix) property to use when building the project. --no-restore Do not restore the project before building. [default: False] --interactive Allows the command to stop and wait for user input or action (for example to complete authentication). [default: False] -v, -verbosity Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. -o, --output The output directory to place built artifacts in. --artifacts-path The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path. --no-incremental Do not use incremental building. [default: False] --no-dependencies Do not build project-to-project references and only build the specified project. [default: False] -nologo, --no-logo Do not display the startup banner or the copyright message. [default: True] --sc, --self-contained Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'false.' However, when targeting .NET 7 or lower, the default is 'true' if a runtime identifier is specified. [default: False] --no-self-contained Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. [default: False] -r, --runtime The target runtime to build for. -a, --arch The target architecture. --os The target operating system. --disable-build-servers Force the command to ignore any persistent build servers. [default: False] -?, -h, --help Show command line help. """ [[commands.source]] id = "help-run" kind = "help" revision = ".NET SDK 10.0.401 (dotnet run -h)" evidence = """Description: .NET Run Command Usage: dotnet run [...] [options] Arguments: Arguments passed to the application that is being run. [] Options: -c, --configuration The configuration to run for. The default for most projects is 'Debug'. -f, --framework The target framework to run for. The target framework must also be specified in the project file. --project Defines the path of the project file to run. Use path to the project file, or path to the directory containing the project file. If not specified, it defaults to the current directory. --file The path to the file-based app to run (can be also passed as the first argument if there is no project in the current directory). -lp, --launch-profile The name of the launch profile (if any) to use when launching the application. --no-launch-profile Do not attempt to use launchSettings.json or [app].run.json to configure the application. [default: False] --device The device identifier to use for running the application. --list-devices List available devices for running the application. [default: False] --no-build Do not build the project before running. Implies --no-restore. [default: False] --interactive Allows the command to stop and wait for user input or action (for example to complete authentication). [default: False] --no-restore Do not restore the project before building. [default: False] --no-cache Skip up to date checks and always build the program before running. [default: False] --sc, --self-contained Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'false.' However, when targeting .NET 7 or lower, the default is 'true' if a runtime identifier is specified. [default: False] --no-self-contained Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. [default: False] -v, -verbosity Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. -r, --runtime The target runtime to run for. -a, --arch The target architecture. --os The target operating system. --disable-build-servers Force the command to ignore any persistent build servers. [default: False] --artifacts-path The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path. -e, --environment Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does. This argument can be specified multiple times to provide multiple variables. Examples: -e VARIABLE=abc -e VARIABLE="value with spaces" -e VARIABLE="value;seperated with;semicolons" -e VAR1=abc -e VAR2=def -e VAR3=ghi -?, -h, --help Show command line help. """ [[commands.source]] id = "help-test" kind = "help" revision = ".NET SDK 10.0.401 (dotnet test -h)" evidence = """Description: .NET Test Command for VSTest. To use Microsoft.Testing.Platform, opt-in to the Microsoft.Testing.Platform-based command via global.json. For more information, see https://aka.ms/dotnet-test. Usage: dotnet test [options] [[--] ...]] Options: -s, --settings The settings file to use when running tests. -t, --list-tests List the discovered tests instead of running the tests. [default: False] -e, --environment Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does. This will force the tests to be run in an isolated process. This argument can be specified multiple times to provide multiple variables. Examples: -e VARIABLE=abc -e VARIABLE="value with spaces" -e VARIABLE="value;seperated with;semicolons" -e VAR1=abc -e VAR2=def -e VAR3=ghi --filter Run tests that match the given expression. Examples: Run tests with priority set to 1: --filter "Priority = 1" Run a test with the specified full name: --filter "FullyQualifiedName=Namespace.ClassName.M ethodName" Run tests that contain the specified name: --filter "FullyQualifiedName~Namespace.Class" See https://aka.ms/vstest-filtering for more information on filtering support. --test-adapter-path The path to the custom adapters to use for the test run. -l, --logger The logger to use for test results. Examples: Log in trx format using a unique file name: --logger trx Log in trx format using the specified file name: --logger "trx;LogFileName=" See https://aka.ms/vstest-report for more information on logger arguments. -o, --output The output directory to place built artifacts in. --artifacts-path The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path. -d, --diag Enable verbose logging to the specified file. --no-build Do not build the project before testing. Implies --no-restore. [default: False] --results-directory The directory where the test results will be placed. The specified directory will be created if it does not exist. --collect The friendly name of the data collector to use for the test run. More info here: https://aka.ms/vstest-collect --blame Runs the tests in blame mode. This option is helpful in isolating problematic tests that cause the test host to crash or hang, but it does not create a memory dump by default. When a crash is detected, it creates an sequence file in TestResults/guid/guid_Sequence.xml that captures the order of tests that were run before the crash. Based on the additional settings, hang dump or crash dump can also be collected. Example: Timeout the test run when test takes more than the default timeout of 1 hour, and collect crash dump when the test host exits unexpectedly. (Crash dumps require additional setup, see below.) dotnet test --blame-hang --blame-crash Example: Timeout the test run when a test takes more than 20 minutes and collect hang dump. dotnet test --blame-hang-timeout 20min [default: False] --blame-crash Runs the tests in blame mode and collects a crash dump when the test host exits unexpectedly. This option depends on the version of .NET used, the type of error, and the operating system. For exceptions in managed code, a dump will be automatically collected on .NET 5.0 and later versions. It will generate a dump for testhost or any child process that also ran on .NET 5.0 and crashed. Crashes in native code will not generate a dump. This option works on Windows, macOS, and Linux. Crash dumps in native code, or when targetting .NET Framework, or .NET Core 3.1 and earlier versions, can only be collected on Windows, by using Procdump. A directory that contains procdump.exe and procdump64.exe must be in the PATH or PROCDUMP_PATH environment variable. The tools can be downloaded here: https://docs.microsoft.com/sysinternals/d ownloads/procdump To collect a crash dump from a native application running on .NET 5.0 or later, the usage of Procdump can be forced by setting the VSTEST_DUMP_FORCEPROCDUMP environment variable to 1. Implies --blame. [default: False] --blame-crash-dump-type The type of crash dump to be collected. Supported values are full (default) and mini. Implies --blame-crash. --blame-crash-collect-always Enables collecting crash dump on expected as well as unexpected testhost exit. [default: False] --blame-hang Run the tests in blame mode and enables collecting hang dump when test exceeds the given timeout. [default: False] --blame-hang-dump-type The type of crash dump to be collected. The supported values are full (default), mini, and none. When 'none' is used then test host is terminated on timeout, but no dump is collected. Implies --blame-hang. --blame-hang-timeout Per-test timeout, after which hang dump is triggered and the testhost process is terminated. Default is 1h. The timeout value is specified in the following format: 1.5h / 90m / 5400s / 5400000ms. When no unit is used (e.g. 5400000), the value is assumed to be in milliseconds. When used together with data driven tests, the timeout behavior depends on the test adapter used. For xUnit, NUnit and MSTest 2.2.4+ the timeout is renewed after every test case, For MSTest before 2.2.4, the timeout is used for all testcases. -nologo, --no-logo Run test(s), without displaying Microsoft Testplatform banner [default: True] -c, --configuration The configuration to use for running tests. The default for most projects is 'Debug'. -f, --framework The target framework to run tests for. The target framework must also be specified in the project file. --no-restore Do not restore the project before building. [default: False] --interactive Allows the command to stop and wait for user input or action (for example to complete authentication). [default: False] -v, -verbosity Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]. -r, --runtime The target runtime to test for. -a, --arch The target architecture. --os The target operating system. --disable-build-servers Force the command to ignore any persistent build servers. [default: False] -?, -h, --help Show command line help. Additional Arguments: Arguments passed to the application that is being run. """ [[commands.source]] id = "help-new" kind = "help" revision = ".NET SDK 10.0.401 (dotnet new -h)" evidence = """Description: Template Instantiation Commands for .NET CLI. Usage: dotnet new [ [...]] [options] dotnet new [command] [options] Arguments: A short name of the template to create. Template specific options to use. Options: -o, --output Location to place the generated output. -n, --name The name for the output being created. If no name is specified, the name of the output directory is used. --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation. [default: False] --force Forces content to be generated even if it would change existing files. [default: False] --no-update-check Disables checking for the template package updates when instantiating a template. [default: False] --project The project that should be used for context evaluation. -v, --verbosity Sets the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], and diag[nostic]. [default: normal] -d, --diagnostics Enables diagnostic output. [default: False] -?, -h, --help Show command line help. Commands: create Instantiates a template with given short name. An alias of 'dotnet new