Skip to content

Commit 7d1b518

Browse files
meaghanlewisgewarrenCopilot
authored
Update .NET CLI command docs to reflect support for @ symbol (#49872)
* Update .NET CLI command docs to reflect support for @ symbol * Update documentation to replace "at symbol" with "character" for clarity * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Copilot <[email protected]> * Apply suggestions from code review --------- Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 9c723a1 commit 7d1b518

File tree

6 files changed

+54
-15
lines changed

6 files changed

+54
-15
lines changed

docs/core/tools/dotnet-new-install.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet new install
33
description: The dotnet new install command installs a template package.
4-
ms.date: 04/15/2022
4+
ms.date: 11/12/2025
55
---
66
# dotnet new install
77

8-
**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions
8+
**This article applies to:** ✔️ .NET 6 SDK and later versions
99

1010
## Name
1111

@@ -20,7 +20,7 @@ dotnet new install <PATH|NUGET_ID> [--interactive] [--add-source|--nuget-source
2020

2121
## Description
2222

23-
The `dotnet new install` command installs a template package from the `PATH` or `NUGET_ID` provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format `<package-name>::<package-version>`. By default, `dotnet new` passes \* for the version, which represents the latest stable package version. For more information, see the [Examples](#examples) section.
23+
The `dotnet new install` command installs a template package from the `PATH` or `NUGET_ID` provided. If you want to install a specific version or prerelease version of a template package, specify the version in the format `<package-name>@<package-version>`. (The colon separator `::` was deprecated in favor of the `@` character in .NET 9.0.200 SDK.) By default, `dotnet new` passes \* for the version, which represents the latest stable package version. For more information, see the [Examples](#examples) section.
2424

2525
If a version of the template package was already installed when you run this command, the template package will be updated to the specified version. If no version is specified, the package is updated to the latest stable version.
2626
Starting with .NET SDK 6.0.100, if the argument specifies the version, and that version of the NuGet package is already installed, it won't be reinstalled.
@@ -50,7 +50,7 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat
5050
- **`<PATH|NUGET_ID>`**
5151
5252
The folder on the file system or the NuGet package identifier to install the template package from. `dotnet new` attempts to install the NuGet package from the NuGet sources available for the current working directory and the sources specified via the `--add-source` option.
53-
If you want to install a specific version or prerelease version of a template package from NuGet source, specify the version in the format `<package-name>::<package-version>`.
53+
If you want to install a specific version or prerelease version of a template package from NuGet source, specify the version in the format `<package-name>@<package-version>`. (The colon separator `::` was deprecated in favor of the `@` character in .NET 9.0.200 SDK.)
5454
5555
## Options
5656
@@ -91,13 +91,13 @@ Starting with .NET SDK 6.0.100, installed template packages are available in lat
9191
- Install version 2.0 of the SPA templates for ASP.NET Core:
9292

9393
```dotnetcli
94-
dotnet new install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0
94+
dotnet new install Microsoft.DotNet.Web.Spa.ProjectTemplates@2.0.0
9595
```
9696

9797
- Install version 2.0 of the SPA templates for ASP.NET Core from a custom NuGet source using interactive mode:
9898

9999
```dotnetcli
100-
dotnet new install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0 --add-source "https://api.my-custom-nuget.com/v3/index.json" --interactive
100+
dotnet new install Microsoft.DotNet.Web.Spa.ProjectTemplates@2.0.0 --add-source "https://api.my-custom-nuget.com/v3/index.json" --interactive
101101
```
102102

103103
## See also

docs/core/tools/dotnet-tool-install.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet tool install command
33
description: The dotnet tool install command installs the specified .NET tool on your machine.
4-
ms.date: 10/28/2025
4+
ms.date: 11/12/2025
55
---
66
# dotnet tool install
77

@@ -94,6 +94,8 @@ For more information, see [Install a local tool](global-tools.md#install-a-local
9494

9595
Name/ID of the NuGet package that contains the .NET tool to install.
9696

97+
Starting in .NET 10.0.100 SDK, use the name/ID, and version separated by `@` to install a .NET tool.
98+
9799
## Options
98100

99101
[!INCLUDE [allow-downgrade](../../../includes/cli-allow-downgrade.md)]
@@ -201,10 +203,18 @@ For more information, see [Install a local tool](global-tools.md#install-a-local
201203

202204
Installs version 2.0.0 of [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a global tool.
203205

206+
- **`dotnet tool install -g [email protected]`**
207+
208+
Installs version 2.1.7 of [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a global tool.
209+
204210
- **`dotnet tool install dotnetsay`**
205211

206212
Installs [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a local tool for the current directory.
207213

214+
- **`dotnet tool install [email protected]`**
215+
216+
Installs version 2.1.7 of [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a local tool for the current directory.
217+
208218
- **`dotnet tool install -g dotnetsay --verbosity minimal`**
209219

210220
Installs [dotnetsay](https://www.nuget.org/packages/dotnetsay/) as a global tool with the verbosity of minimal. The default verbosity for global tool is quiet.

docs/core/tools/dotnet-tool-update.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet tool update command
33
description: The dotnet tool update command updates the specified .NET tool on your machine.
4-
ms.date: 10/28/2025
4+
ms.date: 11/12/2025
55
---
66
# dotnet tool update
77

@@ -54,7 +54,11 @@ The `dotnet tool update` command provides a way for you to update .NET tools on
5454

5555
- **`PACKAGE_ID`**
5656

57-
Name/ID of the NuGet package that contains the .NET global tool to update. You can find the package name using the [dotnet tool list](dotnet-tool-list.md) command.
57+
Name/ID of the NuGet package that contains the .NET global tool to update.
58+
59+
Starting in .NET 10.0.100 SDK, use the name/ID, and version separated by `@` to update a .NET tool.
60+
61+
You can find the package name using the [dotnet tool list](dotnet-tool-list.md) command.
5862

5963
## Options
6064

@@ -138,9 +142,13 @@ The `dotnet tool update` command provides a way for you to update .NET tools on
138142

139143
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) global tool to the latest patch version, with a major version of `2`, and a minor version of `0`.
140144

141-
- **`dotnet tool update -g dotnetsay --version (2.0.*,2.1.4)`**
145+
- **`dotnet tool update -g [email protected]*`**
146+
147+
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) global tool to the latest patch version, 2.1.7.
148+
149+
- **`dotnet tool update -g dotnetsay --version (2.0.0,2.1.7)`**
142150

143-
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) global tool to the lowest version within the specified range `(> 2.0.0 && < 2.1.4)`, version `2.1.0` would be installed. For more information on semantic versioning ranges, see [NuGet packaging version ranges](/nuget/concepts/package-versioning#version-ranges).
151+
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) global tool to the lowest version within the specified range `(> 2.0.0 && < 2.1.7)`, version `2.1.0` would be installed. For more information on semantic versioning ranges, see [NuGet packaging version ranges](/nuget/concepts/package-versioning#version-ranges).
144152

145153
## See also
146154

docs/core/tools/dotnet-workload-install.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet workload install command
33
description: The 'dotnet workload install' command installs optional workloads.
4-
ms.date: 09/10/2021
4+
ms.date: 11/12/2025
55
no-loc: [dotnet workload install]
66
---
77
# dotnet workload install
@@ -96,7 +96,7 @@ The `dotnet workload update` command also downloads advertising manifests. The d
9696

9797
[!INCLUDE [verbosity](../../../includes/cli-verbosity-packages.md)]
9898

99-
[!INCLUDE [version](../../../includes/cli-version.md)]
99+
[!INCLUDE [workload-version](../../../includes/cli-workload-version.md)]
100100

101101
## Examples
102102

@@ -111,3 +111,9 @@ The `dotnet workload update` command also downloads advertising manifests. The d
111111
```dotnetcli
112112
dotnet workload install maui-android maui-ios
113113
```
114+
115+
- Install the workload version specified by the `@` character:
116+
117+
```dotnetcli
118+
dotnet workload install [email protected]
119+
```

docs/core/tools/dotnet-workload-search.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet workload search command
33
description: The 'dotnet workload search' command searches for optional workloads.
4-
ms.date: 08/31/2021
4+
ms.date: 11/12/2025
55
---
66
# dotnet workload search
77

@@ -14,7 +14,7 @@ ms.date: 08/31/2021
1414
## Synopsis
1515

1616
```dotnetcli
17-
dotnet workload search [<SEARCH_STRING>] [-v|--verbosity <LEVEL>]
17+
dotnet workload search [<SEARCH_STRING>] [-v|--verbosity <LEVEL>] [version <WORKLOAD_VERSION>]
1818
1919
dotnet workload search -?|-h|--help
2020
```
@@ -37,6 +37,8 @@ For more information about the `dotnet workload` commands, see the [dotnet workl
3737

3838
[!INCLUDE [verbosity](../../../includes/cli-verbosity-minimal.md)]
3939

40+
[!INCLUDE [workload-version](../../../includes/cli-workload-version.md)]
41+
4042
## Examples
4143

4244
- List all available workloads:
@@ -50,3 +52,9 @@ For more information about the `dotnet workload` commands, see the [dotnet workl
5052
```dotnetcli
5153
dotnet workload search maui
5254
```
55+
56+
- Search for a workload that matches the provided version:
57+
58+
```dotnetcli
59+
dotnet workload search version [email protected]
60+
```

includes/cli-workload-version.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
ms.date: 11/12/2025
3+
ms.topic: include
4+
---
5+
- **`version <WORKLOAD_VERSION>`**
6+
7+
A workload version to display, or one or more workloads and their versions joined by the `@` character. Support for the `@` character is available since 9.0.200 SDK.

0 commit comments

Comments
 (0)