diff --git a/docs/core/tools/dotnet-new-install.md b/docs/core/tools/dotnet-new-install.md index 604c0d7896a37..63e63c394155f 100644 --- a/docs/core/tools/dotnet-new-install.md +++ b/docs/core/tools/dotnet-new-install.md @@ -54,6 +54,8 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat ## Options +[!INCLUDE [response-file](../../../includes/cli-response-file.md)] + - **`--add-source|--nuget-source `** By default, `dotnet new install` uses the hierarchy of NuGet configuration files from the current directory to determine the NuGet source the package can be installed from. If `--nuget-source` is specified, the source will be added to the list of sources to be checked. diff --git a/docs/core/tools/dotnet-tool-install.md b/docs/core/tools/dotnet-tool-install.md index b62f7e5d15658..f1b22fd43e9c8 100644 --- a/docs/core/tools/dotnet-tool-install.md +++ b/docs/core/tools/dotnet-tool-install.md @@ -96,6 +96,8 @@ For more information, see [Install a local tool](global-tools.md#install-a-local ## Options +[!INCLUDE [response-file](../../../includes/cli-response-file.md)] + [!INCLUDE [allow-downgrade](../../../includes/cli-allow-downgrade.md)] - **`--allow-roll-forward`** @@ -213,6 +215,10 @@ For more information, see [Install a local tool](global-tools.md#install-a-local Installs [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a global tool and allows it to run on newer .NET versions if the target runtime isn't available. +- **`dotnet tool install @tools.rsp`** + + Installs tools specified in the `tools.rsp` response file. The response file might contain options like `--global` and package names. + ## See also - [.NET tools](global-tools.md) diff --git a/docs/core/tools/dotnet-tool-update.md b/docs/core/tools/dotnet-tool-update.md index 0ac6c1413cee2..df76e5be31be9 100644 --- a/docs/core/tools/dotnet-tool-update.md +++ b/docs/core/tools/dotnet-tool-update.md @@ -58,6 +58,8 @@ The `dotnet tool update` command provides a way for you to update .NET tools on ## Options +[!INCLUDE [response-file](../../../includes/cli-response-file.md)] + [!INCLUDE [add-source](../../../includes/cli-add-source.md)] - **`--all`** diff --git a/docs/core/tools/dotnet-workload-install.md b/docs/core/tools/dotnet-workload-install.md index 3ffd14d09beaa..5f66d57dfc77a 100644 --- a/docs/core/tools/dotnet-workload-install.md +++ b/docs/core/tools/dotnet-workload-install.md @@ -74,6 +74,8 @@ The `dotnet workload update` command also downloads advertising manifests. The d ## Options +[!INCLUDE [response-file](../../../includes/cli-response-file.md)] + [!INCLUDE [config-file](../../../includes/cli-configfile.md)] [!INCLUDE [disable-parallel](../../../includes/cli-disable-parallel.md)] @@ -111,3 +113,18 @@ The `dotnet workload update` command also downloads advertising manifests. The d ```dotnetcli dotnet workload install maui-android maui-ios ``` + +- Install workloads using a response file: + + Create a file named `workloads.rsp` with the following content: + + ```rsp + maui + wasm-tools + ``` + + Then install the workloads: + + ```dotnetcli + dotnet workload install @workloads.rsp + ``` diff --git a/docs/core/tools/dotnet-workload-search.md b/docs/core/tools/dotnet-workload-search.md index 50628ded0cc51..b2755657143f3 100644 --- a/docs/core/tools/dotnet-workload-search.md +++ b/docs/core/tools/dotnet-workload-search.md @@ -33,6 +33,8 @@ For more information about the `dotnet workload` commands, see the [dotnet workl ## Options +[!INCLUDE [response-file](../../../includes/cli-response-file.md)] + [!INCLUDE [help](../../../includes/cli-help.md)] [!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)] diff --git a/includes/cli-response-file.md b/includes/cli-response-file.md new file mode 100644 index 0000000000000..e7a5e314853f2 --- /dev/null +++ b/includes/cli-response-file.md @@ -0,0 +1,7 @@ +--- +ms.date: 11/11/2025 +ms.topic: include +--- +- **`@`** + + Reads a response file for additional options. The file name must immediately follow the `@` character with no white space between them. Each line in the response file should contain a single option or argument. You can't use the backslash character (`\`) to concatenate lines. Response files help when commands exceed terminal limits. You can combine response file options with command-line arguments.