Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 14 additions & 24 deletions docs/core/tools/dotnet-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ms.date: 09/24/2025
---
# dotnet build

**This article applies to:** ✔️ .NET 6 and later versions
**This article applies to:** ✔️ .NET 6 SDK and later versions

## Name

Expand All @@ -16,15 +16,13 @@ ms.date: 09/24/2025
```dotnetcli
dotnet build [<PROJECT>|<SOLUTION>|<FILE>] [-a|--arch <ARCHITECTURE>]
[--artifacts-path <ARTIFACTS_DIR>]
[-c|--configuration <CONFIGURATION>] [-f|--framework <FRAMEWORK>]
[--disable-build-servers]
[--force] [--interactive] [--no-dependencies] [--no-incremental]
[--no-restore] [--nologo] [--no-self-contained] [--os <OS>]
[-o|--output <OUTPUT_DIRECTORY>]
[-p|--property:<PROPERTYNAME>=<VALUE>]
[-r|--runtime <RUNTIME_IDENTIFIER>]
[-sc|--self-contained [true|false]] [--source <SOURCE>]
[--tl:[auto|on|off]] [--use-current-runtime, --ucr [true|false]]
[-c|--configuration <CONFIGURATION>] [--disable-build-servers]
[-f|--framework <FRAMEWORK>] [--force] [--interactive]
[--no-dependencies] [--no-incremental] [--no-restore] [--nologo]
[--no-self-contained] [-o|--output <OUTPUT_DIRECTORY>] [--os <OS>]
[-p|--property:<PROPERTYNAME>=<VALUE>] [-r|--runtime <RUNTIME_IDENTIFIER>]
[--sc|--self-contained] [--source <SOURCE>]
[--tl:[auto|on|off]] [ --ucr|--use-current-runtime]
[-v|--verbosity <LEVEL>] [--version-suffix <VERSION_SUFFIX>]

dotnet build -h|--help
Expand Down Expand Up @@ -95,8 +93,6 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev

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.

[!INCLUDE [help](../../../includes/cli-help.md)]

[!INCLUDE [interactive](../../../includes/cli-interactive-3-0.md)]

- **`--no-dependencies`**
Expand All @@ -115,9 +111,7 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev

Doesn't display the startup banner or the copyright message.

- **`--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 SDK.
[!INCLUDE [no-self-contained](../../../includes/cli-no-self-contained.md)]

- **`-o|--output <OUTPUT_DIRECTORY>`**

Expand All @@ -142,28 +136,24 @@ Running `dotnet build` is equivalent to running `dotnet msbuild -restore`; howev

Specifies the target runtime. For a list of Runtime Identifiers (RIDs), see the [RID catalog](../rid-catalog.md). If you use this option with .NET 6 SDK, use `--self-contained` or `--no-self-contained` also. If not specified, the default is to build for the current OS and architecture.

- **`--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.
[!INCLUDE [self-contained](../../../includes/cli-self-contained.md)]

- **`--source <SOURCE>`**

The URI of the NuGet package source to use during the restore operation.

[!INCLUDE [tl](../../../includes/cli-tl.md)]

- **`-v|--verbosity <LEVEL>`**
[!INCLUDE [use-current-runtime](../../../includes/cli-use-current-runtime.md)]

Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. The default is `minimal`. By default, MSBuild displays warnings and errors at all verbosity levels. To exclude warnings, use `/property:WarningLevel=0`. For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and [WarningLevel](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel).

- **`--use-current-runtime, --ucr [true|false]`**

Sets the `RuntimeIdentifier` to a platform portable `RuntimeIdentifier` based on the one of your machine. This happens implicitly with properties that require a `RuntimeIdentifier`, such as `SelfContained`, `PublishAot`, `PublishSelfContained`, `PublishSingleFile`, and `PublishReadyToRun`. If the property is set to false, that implicit resolution will no longer occur.
[!INCLUDE [verbosity](../../../includes/cli-verbosity.md)]

- **`--version-suffix <VERSION_SUFFIX>`**

Sets the value of the `$(VersionSuffix)` property to use when building the project. This only works if the `$(Version)` property isn't set. Then, `$(Version)` is set to the `$(VersionPrefix)` combined with the `$(VersionSuffix)`, separated by a dash.

[!INCLUDE [help](../../../includes/cli-help.md)]

## Examples

- Build a project and its dependencies:
Expand Down
2 changes: 1 addition & 1 deletion docs/core/tools/dotnet-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ms.date: 09/24/2025
---
# dotnet clean

**This article applies to:** ✔️ .NET 6 and later versions
**This article applies to:** ✔️ .NET 6 SDK and later versions

## Name

Expand Down
21 changes: 13 additions & 8 deletions docs/core/tools/dotnet-dev-certs.md
Original file line number Diff line number Diff line change
@@ -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/29/2025
---
# dotnet dev-certs

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

## Name

Expand All @@ -15,7 +15,8 @@ ms.date: 07/14/2022

```dotnetcli
dotnet dev-certs https
[-c|--check] [--clean] [-ep|--export-path <PATH>]
[-c|--check] [--check-trust-machine-readable]
[--clean] [-ep|--export-path <PATH>]
[--format] [-i|--import] [-np|--no-password]
[-p|--password] [-q|--quiet] [-t|--trust]
[-v|--verbose] [--version]
Expand Down Expand Up @@ -61,6 +62,10 @@ The `dotnet dev-certs` command manages a self-signed certificate to enable HTTPS

Checks for the existence of the development certificate but doesn't perform any action. Use this option with the `--trust` option to check if the certificate is not only valid but also trusted.

- **`--check-trust-machine-readable`**

Same as running `--check --trust`, but outputs the results in JSON.

- **`--clean`**

Removes all HTTPS development certificates from the certificate store by using the .NET certificate store API. Doesn't remove any physical files that were created by using the `--export-path` option. On macOS in .NET 7.0, the `dotnet dev-certs` command creates the certificate on a path on disk, and the clean operation removes that certificate file.
Expand Down Expand Up @@ -188,8 +193,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)
83 changes: 46 additions & 37 deletions docs/core/tools/dotnet-format.md
Original file line number Diff line number Diff line change
@@ -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/29/2025
---
# dotnet format

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

## Name

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

```dotnetcli
dotnet format [<PROJECT | SOLUTION>] [command] [options]
dotnet format [<PROJECT | SOLUTION>]
[--binarylog <BINARY-LOG-PATH>] [--diagnostics <DIAGNOSTICS>]
[--exclude <EXCLUDE>] [--exclude-diagnostics <EXCLUDE-DIAGNOSTICS>]
[--include <INCLUDE>] [--include-generated]
[--no-restore] [--report <REPORT-PATH>] [--severity <LEVEL>]
[-v|--verbosity <LEVEL>] [--verify-no-changes] [--version]

dotnet format -h|--help
```
Expand All @@ -33,49 +38,53 @@ 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>`**
- **`--binarylog <BINARY-LOG-PATH>`**

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).
Logs all project or solution load information to a binary log file.

* **`--severity`**
- **`--diagnostics <DIAGNOSTICS>`**

The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.
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).

* **`--no-restore`**
- **`--exclude <EXCLUDE>`**

Doesn't execute an implicit restore before formatting. Default is to do implicit restore.
A space-separated list of relative file or folder paths to exclude from formatting. The default is none.

* **`--verify-no-changes`**
- **`--exclude-diagnostics <EXCLUDE-DIAGNOSTICS>`**

Verifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted.
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).

* **`--include <INCLUDE>`**
- **`--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>`**
- **`--include-generated`**

A space-separated list of relative file or folder paths to exclude from formatting. The default is none.
Formats files generated by the SDK.

* **`--include-generated`**
- **`--no-restore`**

Formats files generated by the SDK.
Doesn't execute an implicit restore before formatting. Default is to do implicit restore.

* **`-v|--verbosity <LEVEL>`**
- **`--report <REPORT-PATH>`**

Sets the verbosity level. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`. Default value is `m[inimal]`.
Produces a JSON report in the directory specified by `<REPORT_PATH>`.

* **`--binarylog <BINARY-LOG-PATH>`**
- **`--severity <LEVEL>`**

Logs all project or solution load information to a binary log file.
The minimum severity of diagnostics to fix. Allowed values are `info`, `warn`, and `error`. The default value is `warn`.

* **`--report <REPORT-PATH>`**
- **`--verify-no-changes`**

Produces a JSON report in the directory specified by `<REPORT_PATH>`.
Verifies that no formatting changes would be performed. Terminates with a non zero exit code if any files would have been formatted.

- **`--version`**

Displays version information.

* **`-h|--help`**
[!INCLUDE [verbosity](../../../includes/cli-verbosity.md)]

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

## Subcommands

Expand All @@ -89,7 +98,7 @@ The `dotnet format whitespace` subcommand only runs formatting rules associated

#### Options

* **`--folder`**
- **`--folder`**

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

Expand All @@ -103,11 +112,11 @@ The `dotnet format style` subcommand only runs formatting rules associated with

#### Options

* **`--diagnostics <DIAGNOSTICS>`**
- **`--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 <LEVEL>`**

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

Expand All @@ -121,59 +130,59 @@ The `dotnet format analyzers` subcommand only runs formatting rules associated w

##### Options

* **`--diagnostics <DIAGNOSTICS>`**
- **`--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 <LEVEL>`**

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
Expand Down
4 changes: 2 additions & 2 deletions docs/core/tools/dotnet-msbuild.md
Original file line number Diff line number Diff line change
@@ -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/29/2025
---
# dotnet msbuild

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

## Name

Expand Down
Loading