Skip to content

Commit f18654c

Browse files
authored
Update dotnet commands reference
1 parent 0fbbf03 commit f18654c

16 files changed

+201
-176
lines changed

.openpublishing.redirection.core.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,10 @@
15161516
{
15171517
"source_path_from_root": "/docs/core/compatibility/sdk/9.0/nugetaudit-transitive-packages.md",
15181518
"redirect_url": "/dotnet/core/compatibility/sdk/10.0/nugetaudit-transitive-packages"
1519+
},
1520+
{
1521+
"source_path_from_root": "docs/core/tools/dotnet-migrate.md",
1522+
"redirect_url": "/dotnet/navigate/migration-guide/"
15191523
}
15201524
]
15211525
}

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/25/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-format.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: dotnet format command
33
description: The dotnet format command formats code to match EditorConfig settings for the current directory.
4-
ms.date: 07/12/2021
4+
ms.date: 09/25/2025
55
---
66
# dotnet format
77

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

1010
## Name
1111

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

1616
```dotnetcli
17-
dotnet format [<PROJECT | SOLUTION>] [command] [options]
17+
dotnet format [<PROJECT | SOLUTION>] [--diagnostics <DIAGNOSTICS>] [--exclude-diagnostics <EXCLUDE-DIAGNOSTICS>] [--severity <SEVERITY>] [--no-restore] [--verify-no-changes] [--include <INCLUDE>] [--exclude <EXCLUDE>] [--include-generated] [-v|--verbosity <LEVEL>] [--binarylog <BINARY-LOG-PATH>] [--report <REPORT-PATH>] [--version]
1818
1919
dotnet format -h|--help
2020
```
@@ -33,49 +33,55 @@ The MSBuild project or solution to run code formatting on. If a project or solut
3333

3434
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.
3535

36-
* **`--diagnostics <DIAGNOSTICS>`**
36+
- **`--diagnostics <DIAGNOSTICS>`**
3737

3838
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).
3939

40-
* **`--severity`**
40+
- **`--exclude-diagnostics <EXCLUDE-DIAGNOSTICS>`**
41+
42+
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).
43+
44+
- **`--severity`**
4145

4246
The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.
4347

44-
* **`--no-restore`**
48+
- **`--no-restore`**
4549

4650
Doesn't execute an implicit restore before formatting. Default is to do implicit restore.
4751

48-
* **`--verify-no-changes`**
52+
- **`--verify-no-changes`**
4953

5054
Verifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted.
5155

52-
* **`--include <INCLUDE>`**
56+
- **`--include <INCLUDE>`**
5357

5458
A space-separated list of relative file or folder paths to include in formatting. The default is all files in the solution or project.
5559

56-
* **`--exclude <EXCLUDE>`**
60+
- **`--exclude <EXCLUDE>`**
5761

5862
A space-separated list of relative file or folder paths to exclude from formatting. The default is none.
5963

60-
* **`--include-generated`**
64+
- **`--include-generated`**
6165

6266
Formats files generated by the SDK.
6367

64-
* **`-v|--verbosity <LEVEL>`**
68+
- **`-v|--verbosity <LEVEL>`**
6569

6670
Sets the verbosity level. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. Default value is `m[inimal]`.
6771

68-
* **`--binarylog <BINARY-LOG-PATH>`**
72+
- **`--binarylog <BINARY-LOG-PATH>`**
6973

7074
Logs all project or solution load information to a binary log file.
7175

72-
* **`--report <REPORT-PATH>`**
76+
- **`--report <REPORT-PATH>`**
7377

7478
Produces a JSON report in the directory specified by `<REPORT_PATH>`.
7579

76-
* **`-h|--help`**
80+
- **`--version`**
81+
82+
Displays version information.
7783

78-
Shows help and usage information
84+
[!INCLUDE [help](../../../includes/cli-help.md)]
7985

8086
## Subcommands
8187

@@ -89,7 +95,7 @@ The `dotnet format whitespace` subcommand only runs formatting rules associated
8995

9096
#### Options
9197

92-
* **`--folder`**
98+
- **`--folder`**
9399

94100
Treat the `<PROJECT | SOLUTION>` argument as a path to a simple folder of code files.
95101

@@ -103,11 +109,11 @@ The `dotnet format style` subcommand only runs formatting rules associated with
103109

104110
#### Options
105111

106-
* **`--diagnostics <DIAGNOSTICS>`**
112+
- **`--diagnostics <DIAGNOSTICS>`**
107113

108114
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).
109115

110-
* **`--severity`**
116+
- **`--severity`**
111117

112118
The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`
113119

@@ -121,59 +127,59 @@ The `dotnet format analyzers` subcommand only runs formatting rules associated w
121127

122128
##### Options
123129

124-
* **`--diagnostics <DIAGNOSTICS>`**
130+
- **`--diagnostics <DIAGNOSTICS>`**
125131

126132
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.
127133

128-
* **`--severity`**
134+
- **`--severity`**
129135

130136
The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.
131137

132138
## Examples
133139

134-
* Format all code in the solution:
140+
- Format all code in the solution:
135141

136142
```dotnetcli
137143
dotnet format ./solution.sln
138144
```
139145

140-
* Clean up all code in the application project:
146+
- Clean up all code in the application project:
141147

142148
```dotnetcli
143149
dotnet format ./src/application.csproj
144150
```
145151

146-
* Verify that all code is correctly formatted:
152+
- Verify that all code is correctly formatted:
147153

148154
```dotnetcli
149155
dotnet format --verify-no-changes
150156
```
151157

152-
* Clean up all code in the *src* and *tests* directory but not in *src/submodule-a*:
158+
- Clean up all code in the *src* and *tests* directory but not in *src/submodule-a*:
153159

154160
```dotnetcli
155161
dotnet format --include ./src/ ./tests/ --exclude ./src/submodule-a/
156162
```
157163

158-
* Fix a specific **code style** issue:
164+
- Fix a specific **code style** issue:
159165

160166
```dotnetcli
161167
dotnet format style --diagnostics IDE0005 --severity info
162168
```
163169

164-
* Fix all **code style** issues that have severity `info`, `warning` or `error`:
170+
- Fix all **code style** issues that have severity `info`, `warning` or `error`:
165171

166172
```dotnetcli
167173
dotnet format style --severity info
168174
```
169175

170-
* Fix a specific (non code style) analyzer issue:
176+
- Fix a specific (non code style) analyzer issue:
171177

172178
```dotnetcli
173179
dotnet format analyzers --diagnostics CA1831 --severity warn
174180
```
175181

176-
* Fix all non code style issues that have severity `info`, `warning` or `error`:
182+
- Fix all non code style issues that have severity `info`, `warning` or `error`:
177183

178184
```dotnetcli
179185
dotnet format analyzers --severity info

docs/core/tools/dotnet-migrate.md

Lines changed: 0 additions & 103 deletions
This file was deleted.

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/25/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

0 commit comments

Comments
 (0)