From f18654c90ba83c40bd64cf390c64466119f0e478 Mon Sep 17 00:00:00 2001 From: "Meaghan Osagie (Lewis)" Date: Fri, 26 Sep 2025 14:26:38 -0700 Subject: [PATCH 1/4] Update dotnet commands reference --- .openpublishing.redirection.core.json | 4 + docs/core/tools/dotnet-dev-certs.md | 20 +++-- docs/core/tools/dotnet-format.md | 62 ++++++++------ docs/core/tools/dotnet-migrate.md | 103 ----------------------- docs/core/tools/dotnet-msbuild.md | 4 +- docs/core/tools/dotnet-pack.md | 10 ++- docs/core/tools/dotnet-package-remove.md | 28 ++++-- docs/core/tools/dotnet-package-update.md | 55 ++++++++++++ docs/core/tools/dotnet-restore.md | 6 +- docs/core/tools/dotnet-run.md | 26 +++++- docs/core/tools/dotnet-store.md | 18 ++-- docs/core/tools/dotnet-test.md | 9 +- docs/core/tools/dotnet-watch.md | 20 ++++- docs/navigate/tools-diagnostics/toc.yml | 6 +- includes/cli-disable-build-servers.md | 2 +- includes/cli-interactive-3-0.md | 4 +- 16 files changed, 201 insertions(+), 176 deletions(-) delete mode 100644 docs/core/tools/dotnet-migrate.md create mode 100644 docs/core/tools/dotnet-package-update.md diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index 6533ed21ccc4f..d5a6d9a1142d6 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -1516,6 +1516,10 @@ { "source_path_from_root": "/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md", "redirect_url": "/dotnet/core/compatibility/sdk/10.0/nugetaudit-transitive-packages" + }, + { + "source_path_from_root": "docs/core/tools/dotnet-migrate.md", + "redirect_url": "/dotnet/navigate/migration-guide/" } ] } diff --git a/docs/core/tools/dotnet-dev-certs.md b/docs/core/tools/dotnet-dev-certs.md index a053f0964952b..e1cc2c4ea072e 100644 --- a/docs/core/tools/dotnet-dev-certs.md +++ b/docs/core/tools/dotnet-dev-certs.md @@ -1,11 +1,11 @@ --- title: dotnet dev-certs command description: The dotnet dev-certs command generates a self-signed certificate to enable HTTPS use in development. -ms.date: 07/14/2022 +ms.date: 09/25/2025 --- # dotnet dev-certs -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name @@ -18,7 +18,7 @@ dotnet dev-certs https [-c|--check] [--clean] [-ep|--export-path ] [--format] [-i|--import] [-np|--no-password] [-p|--password] [-q|--quiet] [-t|--trust] - [-v|--verbose] [--version] + [-v|--verbose] [--version] [--check-trust-machine-readable] dotnet dev-certs https -h|--help ``` @@ -140,6 +140,10 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS Display debug information. +- **`--check-trust-machine-readable`** + + Same as running `--check --trust`, but outputs the results in json. + ## Examples - Check for the presence of a development certificate, and create one in the default certificate store if one doesn't exist yet. But don't trust the certificate. @@ -188,8 +192,8 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS ## See also -* [Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md) -* [Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl) -* [Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted) -* [Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https) -* [Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https) +- [Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md) +- [Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl) +- [Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted) +- [Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https) +- [Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https) diff --git a/docs/core/tools/dotnet-format.md b/docs/core/tools/dotnet-format.md index 6dbffdda791ac..1daa3d0830953 100644 --- a/docs/core/tools/dotnet-format.md +++ b/docs/core/tools/dotnet-format.md @@ -1,11 +1,11 @@ --- title: dotnet format command description: The dotnet format command formats code to match EditorConfig settings for the current directory. -ms.date: 07/12/2021 +ms.date: 09/25/2025 --- # dotnet format -**This article applies to:** ✔️ .NET 6.x SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name @@ -14,7 +14,7 @@ ms.date: 07/12/2021 ## Synopsis ```dotnetcli -dotnet format [] [command] [options] +dotnet format [] [--diagnostics ] [--exclude-diagnostics ] [--severity ] [--no-restore] [--verify-no-changes] [--include ] [--exclude ] [--include-generated] [-v|--verbosity ] [--binarylog ] [--report ] [--version] dotnet format -h|--help ``` @@ -33,49 +33,55 @@ The MSBuild project or solution to run code formatting on. If a project or solut None of the options below are required for the `dotnet format` command to succeed, but you can use them to further customize what is formatted and by which rules. -* **`--diagnostics `** +- **`--diagnostics `** A space-separated list of diagnostic IDs to use as a filter when fixing code style or third-party issues. Default value is whichever IDs are listed in the *.editorconfig* file. For a list of built-in analyzer rule IDs that you can specify, see the [list of IDs for code-analysis style rules](../../fundamentals/code-analysis/style-rules/index.md). -* **`--severity`** +- **`--exclude-diagnostics `** + + A space-separated list of diagnostic IDs to exclude when fixing code style or third-party issues. Default value is none. For a list of built-in analyzer rule IDs that you can specify, see the [list of IDs for code-analysis style rules](../../fundamentals/code-analysis/style-rules/index.md). + +- **`--severity`** The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`. -* **`--no-restore`** +- **`--no-restore`** Doesn't execute an implicit restore before formatting. Default is to do implicit restore. -* **`--verify-no-changes`** +- **`--verify-no-changes`** Verifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted. -* **`--include `** +- **`--include `** A space-separated list of relative file or folder paths to include in formatting. The default is all files in the solution or project. -* **`--exclude `** +- **`--exclude `** A space-separated list of relative file or folder paths to exclude from formatting. The default is none. -* **`--include-generated`** +- **`--include-generated`** Formats files generated by the SDK. -* **`-v|--verbosity `** +- **`-v|--verbosity `** Sets the verbosity level. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. Default value is `m[inimal]`. -* **`--binarylog `** +- **`--binarylog `** Logs all project or solution load information to a binary log file. -* **`--report `** +- **`--report `** Produces a JSON report in the directory specified by ``. -* **`-h|--help`** +- **`--version`** + + Displays version information. - Shows help and usage information +[!INCLUDE [help](../../../includes/cli-help.md)] ## Subcommands @@ -89,7 +95,7 @@ The `dotnet format whitespace` subcommand only runs formatting rules associated #### Options -* **`--folder`** +- **`--folder`** Treat the `` argument as a path to a simple folder of code files. @@ -103,11 +109,11 @@ The `dotnet format style` subcommand only runs formatting rules associated with #### Options -* **`--diagnostics `** +- **`--diagnostics `** A space-separated list of diagnostic IDs to use as a filter when fixing code style issues. Default value is whichever IDs are listed in the *.editorconfig* file. For a list of built-in code style analyzer rule IDs that you can specify, see the [list of IDs for code-analysis style rules](../../fundamentals/code-analysis/style-rules/index.md). -* **`--severity`** +- **`--severity`** The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn` @@ -121,59 +127,59 @@ The `dotnet format analyzers` subcommand only runs formatting rules associated w ##### Options -* **`--diagnostics `** +- **`--diagnostics `** A space-separated list of diagnostic IDs to use as a filter when fixing non code style issues. Default value is whichever IDs are listed in the *.editorconfig* file. For a list of built-in analyzer rule IDs that you can specify, see the [list of IDs for quality rules](../../fundamentals/code-analysis/quality-rules/index.md). For third-party analyzers refer to their documentation. -* **`--severity`** +- **`--severity`** The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`. ## Examples -* Format all code in the solution: +- Format all code in the solution: ```dotnetcli dotnet format ./solution.sln ``` -* Clean up all code in the application project: +- Clean up all code in the application project: ```dotnetcli dotnet format ./src/application.csproj ``` -* Verify that all code is correctly formatted: +- Verify that all code is correctly formatted: ```dotnetcli dotnet format --verify-no-changes ``` -* Clean up all code in the *src* and *tests* directory but not in *src/submodule-a*: +- Clean up all code in the *src* and *tests* directory but not in *src/submodule-a*: ```dotnetcli dotnet format --include ./src/ ./tests/ --exclude ./src/submodule-a/ ``` -* Fix a specific **code style** issue: +- Fix a specific **code style** issue: ```dotnetcli dotnet format style --diagnostics IDE0005 --severity info ``` -* Fix all **code style** issues that have severity `info`, `warning` or `error`: +- Fix all **code style** issues that have severity `info`, `warning` or `error`: ```dotnetcli dotnet format style --severity info ``` -* Fix a specific (non code style) analyzer issue: +- Fix a specific (non code style) analyzer issue: ```dotnetcli dotnet format analyzers --diagnostics CA1831 --severity warn ``` -* Fix all non code style issues that have severity `info`, `warning` or `error`: +- Fix all non code style issues that have severity `info`, `warning` or `error`: ```dotnetcli dotnet format analyzers --severity info diff --git a/docs/core/tools/dotnet-migrate.md b/docs/core/tools/dotnet-migrate.md deleted file mode 100644 index 718f3d6284c87..0000000000000 --- a/docs/core/tools/dotnet-migrate.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: dotnet migrate command -description: The dotnet migrate command migrates a project and all of its dependencies. -ms.date: 02/14/2020 ---- -# dotnet migrate - -**This article applies to:** ✔️ .NET Core 2.x SDK - -## Name - -`dotnet migrate` - Migrates a Preview 2 .NET Core project to a .NET Core SDK-style project. - -## Synopsis - -```dotnetcli -dotnet migrate [] [--format-report-file-json ] - [-r|--report-file ] [-s|--skip-project-references [Debug|Release]] - [--skip-backup] [-t|--template-file ] [-v|--sdk-package-version] - [-x|--xproj-file] - -dotnet migrate -h|--help -``` - -## Description - -This command is deprecated. The `dotnet migrate` command is no longer available starting with .NET Core 3.0 SDK. It can only migrate a Preview 2 .NET Core project to a 1.x .NET Core project, which is out of support. - -By default, the command migrates the root project and any project references that the root project contains. This behavior is disabled using the `--skip-project-references` option at run time. - -Migration can be performed on the following assets: - -* A single project by specifying the *project.json* file to migrate. -* All of the directories specified in the *global.json* file by passing in a path to the *global.json* file. -* A *solution.sln* file, where it migrates the projects referenced in the solution. -* On all subdirectories of the given directory recursively. - -The `dotnet migrate` command keeps the migrated *project.json* file inside a `backup` directory, which it creates if the directory doesn't exist. This behavior is overridden using the `--skip-backup` option. - -By default, the migration operation outputs the state of the migration process to standard output (STDOUT). If you use the `--report-file ` option, the output is saved to the file specify. - -The `dotnet migrate` command only supports valid Preview 2 *project.json*-based projects. This means that you cannot use it to migrate DNX or Preview 1 *project.json*-based projects directly to MSBuild/csproj projects. You first need to manually migrate the project to a Preview 2 *project.json*-based project and then use the `dotnet migrate` command to migrate the project. - -## Arguments - -`PROJECT_JSON/GLOBAL_JSON/SOLUTION_FILE/PROJECT_DIR` - -The path to one of the following: - -* a *project.json* file to migrate. -* a *global.json* file: the folders specified in *global.json* are migrated. -* a *solution.sln* file: the projects referenced in the solution are migrated. -* a directory to migrate: recursively searches for *project.json* files to migrate inside the specified directory. - -Defaults to current directory if nothing is specified. - -## Options - -`--format-report-file-json ` - -Output migration report file as JSON rather than user messages. - -`-h|--help` - -Prints out a short help for the command. - -`-r|--report-file ` - -Output migration report to a file in addition to the console. - -`-s|--skip-project-references [Debug|Release]` - -Skip migrating project references. By default, project references are migrated recursively. - -`--skip-backup` - -Skip moving *project.json*, *global.json*, and *\*.xproj* to a `backup` directory after successful migration. - -`-t|--template-file ` - -Template csproj file to use for migration. By default, the same template as the one dropped by `dotnet new console` is used. - -`-v|--sdk-package-version ` - -The version of the sdk package that's referenced in the migrated app. The default is the version of the SDK in `dotnet new`. - -`-x|--xproj-file ` - -The path to the xproj file to use. Required when there is more than one xproj in a project directory. - -## Examples - -Migrate a project in the current directory and all of its project-to-project dependencies: - -`dotnet migrate` - -Migrate all projects that *global.json* file includes: - -`dotnet migrate path/to/global.json` - -Migrate only the current project and no project-to-project (P2P) dependencies. Also, use a specific SDK version: - -`dotnet migrate -s -v 1.0.0-preview4` diff --git a/docs/core/tools/dotnet-msbuild.md b/docs/core/tools/dotnet-msbuild.md index 6d6d51c926c81..c92da7ddac1f4 100644 --- a/docs/core/tools/dotnet-msbuild.md +++ b/docs/core/tools/dotnet-msbuild.md @@ -1,11 +1,11 @@ --- title: dotnet msbuild command description: The dotnet msbuild command provides access to the MSBuild command line. -ms.date: 02/14/2020 +ms.date: 09/25/2025 --- # dotnet msbuild -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name diff --git a/docs/core/tools/dotnet-pack.md b/docs/core/tools/dotnet-pack.md index e21a1e37127d4..e45c4b5dde74e 100644 --- a/docs/core/tools/dotnet-pack.md +++ b/docs/core/tools/dotnet-pack.md @@ -1,11 +1,11 @@ --- title: dotnet pack command description: The dotnet pack command creates NuGet packages for your .NET project. -ms.date: 04/04/2024 +ms.date: 09/26/2025 --- # dotnet pack -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name @@ -15,7 +15,7 @@ ms.date: 04/04/2024 ```dotnetcli dotnet pack [|] [--artifacts-path ] - [-c|--configuration ] [--force] + [-c|--configuration ] [--disable-build-servers] [--force] [--include-source] [--include-symbols] [--interactive] [--no-build] [--no-dependencies] [--no-restore] [--nologo] [-o|--output ] [--runtime ] @@ -64,6 +64,8 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing [!INCLUDE [configuration](../../../includes/cli-configuration-publish-pack.md)] +[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)] + - **`--force`** Forces all dependencies to be resolved even if the last restore was successful. Specifying this flag is the same as deleting the *project.assets.json* file. @@ -78,7 +80,7 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory. -[!INCLUDE [interactive](../../../includes/cli-interactive-3-0.md)] +[!INCLUDE [interactive](../../../includes/cli-interactive.md)] - **`--no-build`** diff --git a/docs/core/tools/dotnet-package-remove.md b/docs/core/tools/dotnet-package-remove.md index 11fbd48aa8f45..70cc896e2a72b 100644 --- a/docs/core/tools/dotnet-package-remove.md +++ b/docs/core/tools/dotnet-package-remove.md @@ -1,15 +1,15 @@ --- title: dotnet package remove command description: The dotnet package remove command provides a convenient option to remove NuGet package reference to a project. -ms.date: 04/02/2025 +ms.date: 09/26/2025 --- # dotnet package remove -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name -`dotnet package remove` - Removes package reference from a project file. +`dotnet package remove` - Removes a package reference from a project file. > [!NOTE] > If you're using .NET 9 SDK or earlier, use the "verb first" form (`dotnet remove package`) instead. The "noun first" form was introduced in .NET 10. For more information, see [More consistent command order](../whats-new/dotnet-10/sdk.md#more-consistent-command-order). @@ -17,7 +17,7 @@ ms.date: 04/02/2025 ## Synopsis ```dotnetcli -dotnet package remove [--project ] +dotnet package remove [--project ] [--interactive] [--file ] dotnet package remove -h|--help ``` @@ -28,16 +28,22 @@ The `dotnet package remove` command provides a convenient option to remove a NuG ## Arguments -`PROJECT` - -Specifies the project file. If not specified, the command searches the current directory for one. - `PACKAGE_NAME` The package reference to remove. ## Options +- **`-p|--project `** + + The project file to operate on. If a solution file is specified, the command will update the package in all projects in the solution that reference it. If not specified, the command will search the current directory for a project file. + +[!INCLUDE [interactive](../../../includes/cli-interactive.md)] + +- **`--file `** + + The file-based app to operate on. + [!INCLUDE [help](../../../includes/cli-help.md)] ## Examples @@ -47,3 +53,9 @@ The package reference to remove. ```dotnetcli dotnet package remove Newtonsoft.Json ``` + +- Remove `Newtonsoft.Json` NuGet package from a specific project file: + + ```dotnetcli + dotnet package remove Newtonsoft.Json --file MyApp.cs + ``` \ No newline at end of file diff --git a/docs/core/tools/dotnet-package-update.md b/docs/core/tools/dotnet-package-update.md new file mode 100644 index 0000000000000..6e89c86549728 --- /dev/null +++ b/docs/core/tools/dotnet-package-update.md @@ -0,0 +1,55 @@ +--- +title: dotnet package update command +description: The dotnet package update command provides a convenient option to update a NuGet package reference to a project. +ms.date: 09/26/2025 +--- +# dotnet package remove + +**This article applies to:** ✔️ .NET 6 and later versions + +## Name + +`dotnet package update` - Updates referenced packages in a project or solution. + +> [!NOTE] +> If you're using .NET 9 SDK or earlier, use the "verb first" form (`dotnet update package`) instead. The "noun first" form was introduced in .NET 10. For more information, see [More consistent command order](../whats-new/dotnet-10/sdk.md#more-consistent-command-order). + +## Synopsis + +```dotnetcli +dotnet package update [--project ] [--interactive] [-v|--verbosity ] + +dotnet package update -h|--help +``` + +## Description + +The `dotnet package update` command provides a convenient option to update a NuGet package reference in a project or solution. + +## Arguments + +`PACKAGE_NAME` + +The package reference to remove. + +## Options + +- **`-p|--project `** + + The project file to operate on. If a solution file is specified, the command will update the package in all projects in the solution that reference it. If not specified, the command will search the current directory for a project file. + +[!INCLUDE [interactive](../../../includes/cli-interactive.md)] + +- **`-v|--verbosity `** + + Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. The default is `normal`. + +[!INCLUDE [help](../../../includes/cli-help.md)] + +## Examples + +- Update `Microsoft.Extensions.Logging` NuGet package from a project in the current directory: + + ```dotnetcli + dotnet package update Microsoft.Extensions.Logging + ``` diff --git a/docs/core/tools/dotnet-restore.md b/docs/core/tools/dotnet-restore.md index 2ca8374b29b70..1d3887bbf13f9 100644 --- a/docs/core/tools/dotnet-restore.md +++ b/docs/core/tools/dotnet-restore.md @@ -18,7 +18,7 @@ dotnet restore [||] [--configfile ] [--disable-bu [--disable-parallel] [-f|--force] [--force-evaluate] [--ignore-failed-sources] [--interactive] [--lock-file-path ] [--locked-mode] - [--no-cache] [--no-dependencies] [--packages ] + [--no-http-cache] [--no-dependencies] [--packages ] [-r|--runtime ] [-s|--source ] [--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]] [--use-lock-file] [-a|--arch ] [--os ] [-v|--verbosity ] @@ -124,9 +124,9 @@ There are three specific settings that `dotnet restore` ignores: Don't allow updating project lock file. -- **`--no-cache`** +- **`--no-http-cache`** - Specifies to not cache HTTP requests. + Disable Http Caching for packages. - **`--no-dependencies`** diff --git a/docs/core/tools/dotnet-run.md b/docs/core/tools/dotnet-run.md index 52d837939bb34..d4263d0e6c5dc 100644 --- a/docs/core/tools/dotnet-run.md +++ b/docs/core/tools/dotnet-run.md @@ -14,12 +14,13 @@ ms.date: 09/24/2025 ## Synopsis ```dotnetcli -dotnet run [] [-a|--arch ] [-c|--configuration ] +dotnet run [] [-a|--arch ] [--artifacts-path ] [-c|--configuration ] [--disable-build-servers] [-e|--environment ] [--file ] [-f|--framework ] [--force] [--interactive] - [--launch-profile ] [--no-build] - [--no-dependencies] [--no-launch-profile] [--no-restore] - [--os ] [--project ] [-r|--runtime ] + [--launch-profile ] [--no-build] [--no-cache] + [--no-dependencies] [--no-launch-profile] [--no-restore] [--no-self-contained] + [--os ] [--project ] [-r|--runtime ] [-sc|--self-contained] + [--property:=] [--tl:[auto|on|off]] [-v|--verbosity ] [[--] [application arguments]] @@ -69,8 +70,12 @@ To run the application, the `dotnet run` command resolves the dependencies of th [!INCLUDE [arch](../../../includes/cli-arch.md)] +[!INCLUDE [artifacts-path](../../../includes/cli-artifacts-path.md)] + [!INCLUDE [configuration](../../../includes/cli-configuration.md)] +[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)] + - **`-e|--environment `** Sets the specified environment variable in the process that will be run by the command. The specified environment variable is *not* applied to the `dotnet run` process. @@ -117,6 +122,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th Doesn't build the project before running. It also implicitly sets the `--no-restore` flag. +- **`--no-cache`** + + Skip up to date checks and always build the program before running. + - **`--no-dependencies`** When restoring a project with project-to-project (P2P) references, restores the root project and not the references. @@ -129,6 +138,11 @@ To run the application, the `dotnet run` command resolves the dependencies of th Doesn't execute an implicit restore when running the command. +- **`--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. + [!INCLUDE [os](../../../includes/cli-os.md)] - **`--project `** @@ -158,6 +172,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the [RID catalog](../rid-catalog.md). +- **`-sc|--self-contained`** + + Publishes the .NET runtime with your application so the runtime doesn't need to be installed on the target system. The default is `false`. However, when targeting .NET 7 or lower, the default is `true` if a runtime identifier is specified. + [!INCLUDE [tl](../../../includes/cli-tl.md)] [!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)] diff --git a/docs/core/tools/dotnet-store.md b/docs/core/tools/dotnet-store.md index 3316eb07d527a..e5ee0f4cd6ace 100644 --- a/docs/core/tools/dotnet-store.md +++ b/docs/core/tools/dotnet-store.md @@ -1,11 +1,11 @@ --- title: dotnet store command description: The 'dotnet store' command stores the specified assemblies in the runtime package store. -ms.date: 02/14/2020 +ms.date: 09/26/2025 --- # dotnet store -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name @@ -14,10 +14,10 @@ ms.date: 02/14/2020 ## Synopsis ```dotnetcli -dotnet store -m|--manifest - -f|--framework -r|--runtime +dotnet store [-m|--manifest ] + [-f|--framework ] [--disable-build-servers] [-r|--runtime ] [--framework-version ] [--output ] - [--skip-optimization] [--skip-symbols] [-v|--verbosity ] + [--skip-optimization] [--skip-symbols] [--use-current-runtime, --ucr [true|false]] [-v|--verbosity ] [--working-dir ] dotnet store -h|--help @@ -33,6 +33,10 @@ dotnet store -h|--help Specifies the [target framework](../../standard/frameworks.md). The target framework has to be specified in the project file. +- **`--disable-build-servers`** + + Disables the use of build servers when running the command. Build servers are enabled by default. + - **`-m|--manifest `** The *package store manifest file* is an XML file that contains the list of packages to store. The format of the manifest file is compatible with the SDK-style project format. So, a project file that references the desired packages can be used with the `-m|--manifest` option to store assemblies in the runtime package store. To specify multiple manifest files, repeat the option and path for each file. For example: `--manifest packages1.csproj --manifest packages2.csproj`. @@ -61,6 +65,10 @@ dotnet store -h|--help Skips symbol generation. Currently, you can only generate symbols on Windows and Linux. +- **`--use-current-runtime, --ucr [true|false]`** + + Use current runtime as the target runtime. The default is `false`. + [!INCLUDE [verbosity](../../../includes/cli-verbosity.md)] - **`-w|--working-dir `** diff --git a/docs/core/tools/dotnet-test.md b/docs/core/tools/dotnet-test.md index 062608d4ccc2f..1a70f535dc11d 100644 --- a/docs/core/tools/dotnet-test.md +++ b/docs/core/tools/dotnet-test.md @@ -5,6 +5,8 @@ ms.date: 03/27/2024 --- # dotnet test +**This article applies to:** ✔️ .NET 6 and later versions + ## Name `dotnet test` - .NET test driver used to execute unit tests. @@ -35,8 +37,6 @@ Some examples of the `dotnet.config` file: ### [dotnet test with VSTest](#tab/dotnet-test-with-vstest) -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions - #### Synopsis ```dotnetcli @@ -54,6 +54,7 @@ dotnet test [ | | | | ] [-c|--configuration ] [--collect ] [-d|--diag ] + [--disable-build-servers] [-f|--framework ] [-e|--environment ] [--filter ] @@ -186,6 +187,10 @@ Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework. Enables diagnostic mode for the test platform and writes diagnostic messages to the specified file and to files next to it. The process that is logging the messages determines which files are created, such as `*.host_.txt` for test host log, and `*.datacollector_.txt` for data collector log. +- **`--disable-build-servers`** + + Disables the use of build servers when running the command. Build servers are enabled by default. + - **`-e|--environment `** Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does exist. Use of this option will force the tests to be run in an isolated process. The option can be specified multiple times to provide multiple variables. diff --git a/docs/core/tools/dotnet-watch.md b/docs/core/tools/dotnet-watch.md index 226b48878cd68..fccab0d0d4227 100644 --- a/docs/core/tools/dotnet-watch.md +++ b/docs/core/tools/dotnet-watch.md @@ -5,7 +5,7 @@ ms.date: 06/03/2024 --- # dotnet watch -**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions +**This article applies to:** ✔️ .NET 6 and later versions ## Name @@ -15,9 +15,11 @@ ms.date: 06/03/2024 ```dotnetcli dotnet watch [] - [--list] + [--artifacts-path ] + [--disable-build-servers] + [--list] [--no-self-contained] [--no-hot-reload] [--non-interactive] - [--project ] + [--project ] [--sc, --self-contained] [-q|--quiet] [-v|--verbose] [--version] [--] @@ -64,6 +66,10 @@ As an alternative to disabling response compression, manually add the browser re ## Options +[!INCLUDE [artifacts-path](../../../includes/cli-artifacts-path.md)] + +[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)] + - **`--list`** Lists all discovered files without starting the watcher. @@ -72,6 +78,10 @@ As an alternative to disabling response compression, manually add the browser re Suppress [hot reload](#hot-reload) for [supported apps](/visualstudio/debugger/hot-reload#supported-net-app-frameworks-and-scenarios). +- **`--no-self-contained`** + + Publishes the application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run the application. Available since .NET 6. + - **`--non-interactive`** Runs `dotnet watch` in non-interactive mode. Use this option to prevent console input from being requested. When hot reload is enabled and a [rude edit](#rude-edits) is detected, dotnet watch restarts the app. Available since .NET 7 SDK. @@ -80,6 +90,10 @@ As an alternative to disabling response compression, manually add the browser re Specifies the path of the project file to run (folder only or including the project file name). If not specified, it defaults to the current directory. +- **`--self-contained [true|false]`** + + Publishes the .NET runtime with the application so the runtime doesn't need to be installed on the target machine. The default is `true` if a runtime identifier is specified. Available since .NET 6. + - **`-q|--quiet`** Suppresses all output that is generated by the `dotnet watch` command except warnings and errors. The option is not passed on to child commands. For example, output from `dotnet restore` and `dotnet run` continues to be output. diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index 52b37667a3956..83c6a39ae66c8 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -116,8 +116,6 @@ items: href: ../../core/tools/dotnet-format.md - name: dotnet help href: ../../core/tools/dotnet-help.md - - name: dotnet migrate - href: ../../core/tools/dotnet-migrate.md - name: dotnet msbuild href: ../../core/tools/dotnet-msbuild.md - name: dotnet new @@ -180,7 +178,7 @@ items: href: ../../core/tools/dotnet-nuget-config-paths.md - name: dotnet pack href: ../../core/tools/dotnet-pack.md - - name: dotnet package add/list/remove/search + - name: dotnet package add/list/remove/search/update items: - name: dotnet package add href: ../../core/tools/dotnet-package-add.md @@ -190,6 +188,8 @@ items: href: ../../core/tools/dotnet-package-remove.md - name: dotnet package search href: ../../core/tools/dotnet-package-search.md + - name: dotnet package update + href: ../../core/tools/dotnet-package-update.md - name: dotnet publish href: ../../core/tools/dotnet-publish.md - name: dotnet reference add/list/remove diff --git a/includes/cli-disable-build-servers.md b/includes/cli-disable-build-servers.md index cfd168f9e8cb7..9813997dcd111 100644 --- a/includes/cli-disable-build-servers.md +++ b/includes/cli-disable-build-servers.md @@ -1,5 +1,5 @@ --- -ms.date: 07/20/2023 +ms.date: 09/26/2025 ms.topic: include --- - **`--disable-build-servers`** diff --git a/includes/cli-interactive-3-0.md b/includes/cli-interactive-3-0.md index 6a33b83f9eb33..1f50d98a5bb8b 100644 --- a/includes/cli-interactive-3-0.md +++ b/includes/cli-interactive-3-0.md @@ -1,7 +1,7 @@ --- -ms.date: 08/04/2021 +ms.date: 09/26/2025 ms.topic: include --- - **`--interactive`** - Allows the command to stop and wait for user input or action. For example, to complete authentication. Available since .NET Core 3.0 SDK. + Allows the command to stop and wait for user input or action. For example, to complete authentication. From 1fb0f36eec520662a5beff2101e2ec244a56075f Mon Sep 17 00:00:00 2001 From: "Meaghan Osagie (Lewis)" Date: Fri, 26 Sep 2025 14:50:37 -0700 Subject: [PATCH 2/4] fix linting errors and redirection --- .openpublishing.redirection.core.json | 2 +- docs/core/tools/dotnet-package-remove.md | 3 ++- docs/core/tools/dotnet-package-update.md | 2 +- docs/core/tools/dotnet-run.md | 3 +-- docs/core/tools/dotnet.md | 2 +- docs/core/tools/index.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index d5a6d9a1142d6..585111194795a 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -1519,7 +1519,7 @@ }, { "source_path_from_root": "docs/core/tools/dotnet-migrate.md", - "redirect_url": "/dotnet/navigate/migration-guide/" + "redirect_url": "/dotnet/core/porting" } ] } diff --git a/docs/core/tools/dotnet-package-remove.md b/docs/core/tools/dotnet-package-remove.md index 70cc896e2a72b..525ed47f42ec1 100644 --- a/docs/core/tools/dotnet-package-remove.md +++ b/docs/core/tools/dotnet-package-remove.md @@ -58,4 +58,5 @@ The package reference to remove. ```dotnetcli dotnet package remove Newtonsoft.Json --file MyApp.cs - ``` \ No newline at end of file + ``` + \ No newline at end of file diff --git a/docs/core/tools/dotnet-package-update.md b/docs/core/tools/dotnet-package-update.md index 6e89c86549728..3daf2eed2da1f 100644 --- a/docs/core/tools/dotnet-package-update.md +++ b/docs/core/tools/dotnet-package-update.md @@ -42,7 +42,7 @@ The package reference to remove. - **`-v|--verbosity `** - Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. The default is `normal`. + Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. The default is `normal`. [!INCLUDE [help](../../../includes/cli-help.md)] diff --git a/docs/core/tools/dotnet-run.md b/docs/core/tools/dotnet-run.md index d4263d0e6c5dc..2c7d7393a3784 100644 --- a/docs/core/tools/dotnet-run.md +++ b/docs/core/tools/dotnet-run.md @@ -140,8 +140,7 @@ To run the application, the `dotnet run` command resolves the dependencies of th - **`--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. + Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application. [!INCLUDE [os](../../../includes/cli-os.md)] diff --git a/docs/core/tools/dotnet.md b/docs/core/tools/dotnet.md index 03cfa024da649..e64952f0e3eb0 100644 --- a/docs/core/tools/dotnet.md +++ b/docs/core/tools/dotnet.md @@ -170,7 +170,6 @@ The following options are available only when `dotnet` runs an application by us | [dotnet clean](dotnet-clean.md) | Clean build outputs. | | [dotnet exec](#options-for-running-an-application) | Runs a .NET application. | | [dotnet help](dotnet-help.md) | Shows more detailed documentation online for the command. | -| [dotnet migrate](dotnet-migrate.md) | Migrates a valid Preview 2 project to a .NET Core SDK 1.0 project. | | [dotnet msbuild](dotnet-msbuild.md) | Provides access to the MSBuild command line. | | [dotnet new](dotnet-new.md) | Initializes a C# or F# project for a given template. | | [dotnet pack](dotnet-pack.md) | Creates a NuGet package of your code. | @@ -198,6 +197,7 @@ The following options are available only when `dotnet` runs an application by us | [dotnet package list](dotnet-package-list.md) | Lists NuGet packages. | | [dotnet package remove](dotnet-package-remove.md) | Removes a NuGet package. | | [dotnet package search](dotnet-package-search.md) | Searches for a NuGet package. | +| [dotnet package update](dotnet-package-update.md) | Updates a NuGet package. | ### NuGet commands diff --git a/docs/core/tools/index.md b/docs/core/tools/index.md index 33c8da824c4bc..47817d0f9803f 100644 --- a/docs/core/tools/index.md +++ b/docs/core/tools/index.md @@ -64,7 +64,6 @@ The following commands are installed by default: - [`test`](dotnet-test.md) - [`vstest`](dotnet-vstest.md) - [`pack`](dotnet-pack.md) -- [`migrate`](dotnet-migrate.md) - [`clean`](dotnet-clean.md) - [`sln`](dotnet-sln.md) - [`help`](dotnet-help.md) @@ -78,6 +77,7 @@ The following commands are installed by default: - [`package list`](dotnet-package-list.md) - [`package remove`](dotnet-package-remove.md) - [`package search`](dotnet-package-search.md) +- [`package update`](dotnet-package-update.md) - [`reference add`](dotnet-reference-add.md) - [`reference list`](dotnet-reference-list.md) - [`reference remove`](dotnet-reference-remove.md) From 80b41b95c0a02d9e891f631eeaa6ffc6eddd5a84 Mon Sep 17 00:00:00 2001 From: "Meaghan Osagie (Lewis)" Date: Fri, 26 Sep 2025 15:07:19 -0700 Subject: [PATCH 3/4] fix redirection --- .openpublishing.redirection.core.json | 2 +- .../sdk/10.0/dotnet-restore-project-json-unsupported.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.openpublishing.redirection.core.json b/.openpublishing.redirection.core.json index 585111194795a..9a60376bf559f 100644 --- a/.openpublishing.redirection.core.json +++ b/.openpublishing.redirection.core.json @@ -1518,7 +1518,7 @@ "redirect_url": "/dotnet/core/compatibility/sdk/10.0/nugetaudit-transitive-packages" }, { - "source_path_from_root": "docs/core/tools/dotnet-migrate.md", + "source_path_from_root": "/docs/core/tools/dotnet-migrate.md", "redirect_url": "/dotnet/core/porting" } ] diff --git a/docs/core/compatibility/sdk/10.0/dotnet-restore-project-json-unsupported.md b/docs/core/compatibility/sdk/10.0/dotnet-restore-project-json-unsupported.md index 4feb15a2d811b..50cf5189fb0d0 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-restore-project-json-unsupported.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-restore-project-json-unsupported.md @@ -30,7 +30,7 @@ This change can affect [source compatibility](../../categories.md#source-compati The `project.json` format was originally available only in .NET Core previews (through Preview 2 of .NET Core 1.0) and was completely replaced by PackageReference in 2017. The format has been marked as deprecated since 2017. -When the `project.json` format was replaced, users migrated these projects using the [`dotnet migrate`](../../../tools/dotnet-migrate.md) command, but that command was removed from the CLI in the .NET Core 3.0 SDK. +When the `project.json` format was replaced, users migrated these projects using the `dotnet migrate` command, but that command was removed from the CLI in the .NET Core 3.0 SDK. The removal of `project.json` support completes this transition and allows the .NET team to focus on delivering a better experience for PackageReference-based projects. @@ -38,7 +38,7 @@ The removal of `project.json` support completes this transition and allows the . Migrate your `project.json` projects to use PackageReference format instead. -If you have .NET Core based `project.json` projects, you can use older versions of the .NET SDK that still include the [`dotnet migrate` command](../../../tools/dotnet-migrate.md) to convert them to the modern project format. +If you have .NET Core based `project.json` projects, you can use older versions of the .NET SDK that still include the `dotnet migrate` to convert them to the modern project format. For more information about migrating from `project.json`, see [Migrating from project.json to .csproj](/nuget/archive/project-json#migrate-projectjson-to-packagereference). From f5988f4512d1e6b0c2cef6d7058e1096477315ac Mon Sep 17 00:00:00 2001 From: "Meaghan Osagie (Lewis)" Date: Fri, 26 Sep 2025 15:15:19 -0700 Subject: [PATCH 4/4] update references in dotnet-package-update --- docs/core/tools/dotnet-package-update.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/tools/dotnet-package-update.md b/docs/core/tools/dotnet-package-update.md index 3daf2eed2da1f..b2adc31d330d0 100644 --- a/docs/core/tools/dotnet-package-update.md +++ b/docs/core/tools/dotnet-package-update.md @@ -3,7 +3,7 @@ title: dotnet package update command description: The dotnet package update command provides a convenient option to update a NuGet package reference to a project. ms.date: 09/26/2025 --- -# dotnet package remove +# dotnet package update **This article applies to:** ✔️ .NET 6 and later versions @@ -24,13 +24,13 @@ dotnet package update -h|--help ## Description -The `dotnet package update` command provides a convenient option to update a NuGet package reference in a project or solution. +The `dotnet package update` command provides a convenient option to update a NuGet package reference in a project or solution. ## Arguments `PACKAGE_NAME` -The package reference to remove. +The package reference to update. ## Options