-
Notifications
You must be signed in to change notification settings - Fork 6k
Refresh dotnet command reference #48787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refresh dotnet command reference #48787
Conversation
docs/core/tools/dotnet-build.md
Outdated
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`** |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's intentional. I didn't see that on other --sc|--self-contained
options, or any other options, and wanted to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be confusing to omit it, because the name reads like you're making it self contained, but it actually defaults to false if you just put --self-contained
. Also, maybe add a remark about how it relates to no-self-contained on line 114.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In .NET 10 at least, it defaults to true.
Edit
I checked back to .NET 6 and it's defaulting to true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be noted, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks y'all. I'll update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I just edited my comment without reloading yours 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think perhaps the description in help output for the command is actually wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adegeo I was about to ask...the help output says in .NET 7 or lower it defaults to true
. I'll test it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meaghan and I talked a bit. We discovered that the description was wrongly changed a few years ago. I opened a PR to fix it: dotnet/sdk#51088
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
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
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
, anddotnet 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
fordotnet dev-certs
, and expanded the option explanations fordotnet format
to include new filtering and reporting capabilities. [1] [2] [3]Inclusion of help and interactive references
[!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
dotnet format.md
to match new option syntax, and clarified usage scenarios for style and analyzer subcommands.Minor corrections and updates
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