Skip to content

Commit ad0e164

Browse files
committed
refresh dotnet command reference to use latest commands and .NET 6 and later versions
1 parent 36487da commit ad0e164

File tree

9 files changed

+101
-47
lines changed

9 files changed

+101
-47
lines changed

docs/core/tools/dotnet-dev-certs.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet dev-certs command
33
description: The dotnet dev-certs command generates a self-signed certificate to enable HTTPS use in development.
4-
ms.date: 07/14/2022
4+
ms.date: 09/29/2025
55
---
66
# dotnet dev-certs
77

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

1010
## Name
1111

@@ -18,7 +18,7 @@ dotnet dev-certs https
1818
[-c|--check] [--clean] [-ep|--export-path <PATH>]
1919
[--format] [-i|--import] [-np|--no-password]
2020
[-p|--password] [-q|--quiet] [-t|--trust]
21-
[-v|--verbose] [--version]
21+
[-v|--verbose] [--version] [--check-trust-machine-readable]
2222
2323
dotnet dev-certs https -h|--help
2424
```
@@ -140,6 +140,10 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS
140140

141141
Display debug information.
142142

143+
- **`--check-trust-machine-readable`**
144+
145+
Same as running `--check --trust`, but outputs the results in json.
146+
143147
## Examples
144148

145149
- 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
188192

189193
## See also
190194

191-
* [Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md)
192-
* [Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl)
193-
* [Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted)
194-
* [Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https)
195-
* [Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https)
195+
- [Generate self-signed certificates with the .NET CLI](../additional-tools/self-signed-certificates-guide.md)
196+
- [Enforce HTTPS in ASP.NET Core](/aspnet/core/security/enforcing-ssl)
197+
- [Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted)
198+
- [Hosting ASP.NET Core images with Docker over HTTPS](/aspnet/core/security/docker-https)
199+
- [Hosting ASP.NET Core images with Docker Compose over HTTPS](/aspnet/core/security/docker-compose-https)

docs/core/tools/dotnet-msbuild.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet msbuild command
33
description: The dotnet msbuild command provides access to the MSBuild command line.
4-
ms.date: 02/14/2020
4+
ms.date: 09/29/2025
55
---
66
# dotnet msbuild
77

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

1010
## Name
1111

docs/core/tools/dotnet-pack.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet pack command
33
description: The dotnet pack command creates NuGet packages for your .NET project.
4-
ms.date: 04/04/2024
4+
ms.date: 09/29/2025
55
---
66
# dotnet pack
77

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

1010
## Name
1111

@@ -15,11 +15,7 @@ ms.date: 04/04/2024
1515

1616
```dotnetcli
1717
dotnet pack [<PROJECT>|<SOLUTION>] [--artifacts-path <ARTIFACTS_DIR>]
18-
[-c|--configuration <CONFIGURATION>] [--force]
19-
[--include-source] [--include-symbols] [--interactive]
20-
[--no-build] [--no-dependencies] [--no-restore] [--nologo]
21-
[-o|--output <OUTPUT_DIRECTORY>] [--runtime <RUNTIME_IDENTIFIER>]
22-
[-s|--serviceable] [--tl:[auto|on|off]] [-v|--verbosity <LEVEL>]
18+
[-c|--configuration <CONFIGURATION>] [--disable-build-servers][--force] [--include-source] [--include-symbols] [--interactive] [--no-build] [--no-dependencies] [--no-restore] [--nologo] [-o|--output <OUTPUT_DIRECTORY>] [--runtime <RUNTIME_IDENTIFIER>] [-s|--serviceable] [--tl:[auto|on|off]] [-v|--verbosity <LEVEL>]
2319
[--version-suffix <VERSION_SUFFIX>]
2420
2521
dotnet pack -h|--help
@@ -64,6 +60,8 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing
6460

6561
[!INCLUDE [configuration](../../../includes/cli-configuration-publish-pack.md)]
6662

63+
[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)]
64+
6765
- **`--force`**
6866

6967
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 +76,7 @@ You can provide MSBuild properties to the `dotnet pack` command for the packing
7876

7977
Includes the debug symbols NuGet packages in addition to the regular NuGet packages in the output directory.
8078

81-
[!INCLUDE [interactive](../../../includes/cli-interactive-3-0.md)]
79+
[!INCLUDE [interactive](../../../includes/cli-interactive.md)]
8280

8381
- **`--no-build`**
8482

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
title: dotnet package remove command
33
description: The dotnet package remove command provides a convenient option to remove NuGet package reference to a project.
4-
ms.date: 04/02/2025
4+
ms.date: 09/29/2025
55
---
66
# dotnet package remove
77

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

1010
## Name
1111

12-
`dotnet package remove` - Removes package reference from a project file.
12+
`dotnet package remove` - Removes a package reference from a project file.
1313

1414
> [!NOTE]
1515
> 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).
1616
1717
## Synopsis
1818

1919
```dotnetcli
20-
dotnet package remove <PACKAGE_NAME> [--project <PROJECT>]
20+
dotnet package remove <PACKAGE_NAME> [--project <PROJECT>] [--interactive] [--file <FILE>]
2121
2222
dotnet package remove -h|--help
2323
```
@@ -28,16 +28,22 @@ The `dotnet package remove` command provides a convenient option to remove a NuG
2828

2929
## Arguments
3030

31-
`PROJECT`
32-
33-
Specifies the project file. If not specified, the command searches the current directory for one.
34-
3531
`PACKAGE_NAME`
3632

3733
The package reference to remove.
3834

3935
## Options
4036

37+
- **`-p|--project <PROJECT>`**
38+
39+
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.
40+
41+
[!INCLUDE [interactive](../../../includes/cli-interactive.md)]
42+
43+
- **`--file <FILE>`**
44+
45+
The file-based app to operate on.
46+
4147
[!INCLUDE [help](../../../includes/cli-help.md)]
4248

4349
## Examples
@@ -47,3 +53,9 @@ The package reference to remove.
4753
```dotnetcli
4854
dotnet package remove Newtonsoft.Json
4955
```
56+
57+
- Remove `Newtonsoft.Json` NuGet package from a specific project file:
58+
59+
```dotnetcli
60+
dotnet package remove Newtonsoft.Json --file MyApp.cs
61+
```

docs/core/tools/dotnet-restore.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet restore command
33
description: Learn how to restore dependencies and project-specific tools with the dotnet restore command.
4-
ms.date: 09/24/2025
4+
ms.date: 09/29/2025
55
---
66
# dotnet restore
77

@@ -17,7 +17,7 @@ ms.date: 09/24/2025
1717
dotnet restore [<PROJECT>|<SOLUTION>|<FILE>] [--configfile <FILE>] [--disable-build-servers]
1818
[--disable-parallel]
1919
[-f|--force] [--force-evaluate] [--ignore-failed-sources]
20-
[--interactive] [--lock-file-path <LOCK_FILE_PATH>] [--locked-mode]
20+
[--interactive] [--lock-file-path <LOCK_FILE_PATH>] [--locked-mode] [--no-http-cache]
2121
[--no-cache] [--no-dependencies] [--packages <PACKAGES_DIRECTORY>]
2222
[-r|--runtime <RUNTIME_IDENTIFIER>] [-s|--source <SOURCE>]
2323
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
@@ -124,6 +124,10 @@ There are three specific settings that `dotnet restore` ignores:
124124

125125
Don't allow updating project lock file.
126126

127+
- **`--no-http-cache`**
128+
129+
Disable Http Caching for packages.
130+
127131
- **`--no-cache`**
128132

129133
Specifies to not cache HTTP requests.

docs/core/tools/dotnet-run.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet run command
33
description: The dotnet run command provides a convenient option to run your application from the source code.
4-
ms.date: 09/24/2025
4+
ms.date: 09/29/2025
55
---
66
# dotnet run
77

@@ -14,13 +14,10 @@ ms.date: 09/24/2025
1414
## Synopsis
1515

1616
```dotnetcli
17-
dotnet run [<applicationArguments>] [-a|--arch <ARCHITECTURE>] [-c|--configuration <CONFIGURATION>]
18-
[-e|--environment <KEY=VALUE>] [--file <FILE_PATH>]
19-
[-f|--framework <FRAMEWORK>] [--force] [--interactive]
20-
[--launch-profile <NAME>] [--no-build]
21-
[--no-dependencies] [--no-launch-profile] [--no-restore]
22-
[--os <OS>] [--project <PATH>] [-r|--runtime <RUNTIME_IDENTIFIER>]
23-
[--tl:[auto|on|off]] [-v|--verbosity <LEVEL>]
17+
dotnet run [<applicationArguments>] [-a|--arch <ARCHITECTURE>] [--artifacts-path <ARTIFACTS_DIR>] [-c|--configuration <CONFIGURATION>]
18+
[-e|--environment <KEY=VALUE>] [--file <FILE_PATH>] [-f|--framework <FRAMEWORK>] [--force] [--interactive]
19+
[--launch-profile <NAME>] [--no-build] [--no-dependencies] [--no-launch-profile] [--no-restore]
20+
[--os <OS>] [--project <PATH>] [-r|--runtime <RUNTIME_IDENTIFIER>] [--tl:[auto|on|off]] [-v|--verbosity <LEVEL>]
2421
[[--] [application arguments]]
2522
2623
dotnet run -h|--help
@@ -69,8 +66,12 @@ To run the application, the `dotnet run` command resolves the dependencies of th
6966

7067
[!INCLUDE [arch](../../../includes/cli-arch.md)]
7168

69+
[!INCLUDE [artifacts-path](../../../includes/cli-artifacts-path.md)]
70+
7271
[!INCLUDE [configuration](../../../includes/cli-configuration.md)]
7372

73+
[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)]
74+
7475
- **`-e|--environment <KEY=VALUE>`**
7576

7677
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 +118,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
117118

118119
Doesn't build the project before running. It also implicitly sets the `--no-restore` flag.
119120

121+
- **`--no-cache`**
122+
123+
Skip up to date checks and always build the program before running.
124+
120125
- **`--no-dependencies`**
121126

122127
When restoring a project with project-to-project (P2P) references, restores the root project and not the references.
@@ -129,6 +134,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
129134

130135
Doesn't execute an implicit restore when running the command.
131136

137+
- **`--no-self-contained`**
138+
139+
Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application.
140+
132141
[!INCLUDE [os](../../../includes/cli-os.md)]
133142

134143
- **`--project <PATH>`**
@@ -158,6 +167,10 @@ To run the application, the `dotnet run` command resolves the dependencies of th
158167

159168
Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the [RID catalog](../rid-catalog.md).
160169

170+
- **`-sc|--self-contained`**
171+
172+
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.
173+
161174
[!INCLUDE [tl](../../../includes/cli-tl.md)]
162175

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

docs/core/tools/dotnet-store.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet store command
33
description: The 'dotnet store' command stores the specified assemblies in the runtime package store.
4-
ms.date: 02/14/2020
4+
ms.date: 09/29/2025
55
---
66
# dotnet store
77

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

1010
## Name
1111

@@ -14,10 +14,10 @@ ms.date: 02/14/2020
1414
## Synopsis
1515

1616
```dotnetcli
17-
dotnet store -m|--manifest <PATH_TO_MANIFEST_FILE>
18-
-f|--framework <FRAMEWORK_VERSION> -r|--runtime <RUNTIME_IDENTIFIER>
17+
dotnet store [-m|--manifest <PATH_TO_MANIFEST_FILE>]
18+
[-f|--framework <FRAMEWORK_VERSION>] [--disable-build-servers] [-r|--runtime <RUNTIME_IDENTIFIER>]
1919
[--framework-version <FRAMEWORK_VERSION>] [--output <OUTPUT_DIRECTORY>]
20-
[--skip-optimization] [--skip-symbols] [-v|--verbosity <LEVEL>]
20+
[--skip-optimization] [--skip-symbols] [--use-current-runtime, --ucr [true|false]] [-v|--verbosity <LEVEL>]
2121
[--working-dir <WORKING_DIRECTORY>]
2222
2323
dotnet store -h|--help
@@ -33,6 +33,8 @@ dotnet store -h|--help
3333

3434
Specifies the [target framework](../../standard/frameworks.md). The target framework has to be specified in the project file.
3535

36+
[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)]
37+
3638
- **`-m|--manifest <PATH_TO_MANIFEST_FILE>`**
3739

3840
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 +63,10 @@ dotnet store -h|--help
6163

6264
Skips symbol generation. Currently, you can only generate symbols on Windows and Linux.
6365

66+
- **`--use-current-runtime, --ucr [true|false]`**
67+
68+
Use current runtime as the target runtime. The default is `false`.
69+
6470
[!INCLUDE [verbosity](../../../includes/cli-verbosity.md)]
6571

6672
- **`-w|--working-dir <WORKING_DIRECTORY>`**

docs/core/tools/dotnet-test.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: dotnet test command
33
description: The dotnet test command is used to execute unit tests in a given project.
4-
ms.date: 03/27/2024
4+
ms.date: 09/29/2025
55
---
66
# dotnet test
77

@@ -35,7 +35,7 @@ Some examples of the `dotnet.config` file:
3535

3636
### [dotnet test with VSTest](#tab/dotnet-test-with-vstest)
3737

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

4040
#### Synopsis
4141

@@ -54,6 +54,7 @@ dotnet test [<PROJECT> | <SOLUTION> | <DIRECTORY> | <DLL> | <EXE>]
5454
[-c|--configuration <CONFIGURATION>]
5555
[--collect <DATA_COLLECTOR_NAME>]
5656
[-d|--diag <LOG_FILE>]
57+
[--disable-build-servers]
5758
[-f|--framework <FRAMEWORK>]
5859
[-e|--environment <NAME="VALUE">]
5960
[--filter <EXPRESSION>]
@@ -186,6 +187,8 @@ Where `Microsoft.NET.Test.Sdk` is the test host, `xunit` is the test framework.
186187

187188
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_<date>.txt` for test host log, and `*.datacollector_<date>.txt` for data collector log.
188189

190+
[!INCLUDE [disable-build-servers](../../../includes/cli-disable-build-servers.md)]
191+
189192
- **`-e|--environment <NAME="VALUE">`**
190193

191194
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.

0 commit comments

Comments
 (0)