Skip to content

Conversation

meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Sep 29, 2025

Summary

This pull request updates the documentation for several .NET CLI commands to align with the .NET 6 SDK and later, and improves accuracy, consistency, and clarity across multiple command reference articles. The most important changes include updating supported version statements, revising command option lists and defaults, and adding new options and help references. Below are the most significant changes grouped by theme.

Documentation version updates

  • Changed the applicability statements in all affected CLI command docs (dotnet-build.md, dotnet-clean.md, dotnet-dev-certs.md, dotnet-format.md, dotnet-msbuild.md, dotnet-pack.md) to specify ".NET 6 SDK and later versions" for improved clarity and consistency. [1] [2] [3] [4] [5] [6]

Command option and behavior improvements

  • Updated the synopsis and option lists for dotnet build, dotnet pack, and dotnet format to reflect current CLI syntax, including reordering, renaming, and clarifying options such as --self-contained, --use-current-runtime, and --disable-build-servers. Default behaviors for options like --self-contained are now more accurately described. [1] [2] [3] [4] [5]

  • Added new options and improved descriptions, such as --check-trust-machine-readable for dotnet dev-certs, and expanded the option explanations for dotnet format to include new filtering and reporting capabilities. [1] [2] [3]

Inclusion of help and interactive references

  • Standardized the placement and inclusion of [!INCLUDE [help](...)] and [!INCLUDE [interactive](...)] blocks across all command docs for improved discoverability and consistency. [1] [2] [3] [4] [5] [6]

Example and formatting consistency

  • Improved example commands and formatting in dotnet format.md to match new option syntax, and clarified usage scenarios for style and analyzer subcommands.

Minor corrections and updates

  • Updated ms.date fields to reflect the new documentation revision date and made minor formatting corrections in "See also" sections and option lists. [1] [2] [3]

These changes help keep the documentation up to date with the latest SDK releases and provide clearer guidance for users of the .NET CLI.

Fixes #48686


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/core/tools/dotnet-build.md dotnet build
docs/core/tools/dotnet-clean.md dotnet clean command
docs/core/tools/dotnet-dev-certs.md dotnet dev-certs
docs/core/tools/dotnet-format.md docs/core/tools/dotnet-format
docs/core/tools/dotnet-msbuild.md dotnet msbuild
docs/core/tools/dotnet-pack.md dotnet pack command
docs/core/tools/dotnet-package-remove.md dotnet package remove
docs/core/tools/dotnet-publish.md docs/core/tools/dotnet-publish
docs/core/tools/dotnet-restore.md dotnet restore
docs/core/tools/dotnet-run.md dotnet run command
docs/core/tools/dotnet-sdk-check.md dotnet sdk check
docs/core/tools/dotnet-store.md docs/core/tools/dotnet-store
docs/core/tools/dotnet-test.md dotnet test
docs/core/tools/dotnet-watch.md dotnet watch

@meaghanlewis meaghanlewis marked this pull request as ready for review September 30, 2025 18:04
@meaghanlewis meaghanlewis requested review from adegeo and a team as code owners September 30, 2025 18:04

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

Same as running `--check --trust`, but outputs the results in json.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Displays version information.

* **`-h|--help`**
- **`-v|--verbosity <LEVEL>`**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you include LEVEL here, but not, say for the severity option?

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]`**
- **`--sc|--self-contained`**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dropping of true/false intentional?


- **`--no-http-cache`**

Disable Http Caching for packages.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Disable Http Caching for packages.
Disable HTTP caching for packages.

Specifies the path of the project file to run (folder name or full path). If not specified, it defaults to the current directory.

The [`-p` abbreviation for `--project` is deprecated](../compatibility/sdk/6.0/deprecate-p-option-dotnet-run.md) starting in .NET 6 SDK. For a limited time starting in .NET 6 RC1 SDK, `-p` can still be used for `--project` despite the deprecation warning. If the argument provided for the option doesn't contain `=`, the command accepts `-p` as short for `--project`. Otherwise, the command assumes that `-p` is short for `--property`. This flexible use of `-p` for `--project` will be phased out in .NET 7.
The [`-p` abbreviation for `--project` is deprecated](../compatibility/sdk/6.0/deprecate-p-option-dotnet-run.md) starting in .NET 6 SDK SDK. For a limited time starting in .NET 6 SDK RC1 SDK, `-p` can still be used for `--project` despite the deprecation warning. If the argument provided for the option doesn't contain `=`, the command accepts `-p` as short for `--project`. Otherwise, the command assumes that `-p` is short for `--property`. This flexible use of `-p` for `--project` will be phased out in .NET 7.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The [`-p` abbreviation for `--project` is deprecated](../compatibility/sdk/6.0/deprecate-p-option-dotnet-run.md) starting in .NET 6 SDK SDK. For a limited time starting in .NET 6 SDK RC1 SDK, `-p` can still be used for `--project` despite the deprecation warning. If the argument provided for the option doesn't contain `=`, the command accepts `-p` as short for `--project`. Otherwise, the command assumes that `-p` is short for `--property`. This flexible use of `-p` for `--project` will be phased out in .NET 7.
The [`-p` abbreviation for `--project` is deprecated](../compatibility/sdk/6.0/deprecate-p-option-dotnet-run.md) starting in .NET 6 SDK. For a limited time, `-p` can still be used for `--project` despite the deprecation warning. If the argument provided for the option doesn't contain `=`, the command accepts `-p` as short for `--project`. Otherwise, the command assumes that `-p` is short for `--property`. This flexible use of `-p` for `--project` will be phased out in .NET 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing dotnetcommands and options
2 participants