-
Notifications
You must be signed in to change notification settings - Fork 6k
Clarify --verbosity
usage in dotnet build
#48889
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?
Clarify --verbosity
usage in dotnet build
#48889
Conversation
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.
@meaghanlewis Should this article include a section on the --tl option? If so we should add a hyperlink from the newly added sentence.
@gewarren the --tl option is already has a section in this doc (it's included by linking a separate md file not by plaintext), that's why I referenced it without elaborating what that is. |
Co-authored-by: Genevieve Warren <[email protected]>
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.
Pull Request Overview
This PR clarifies the behavior of the --verbosity
option in the dotnet build
command documentation to better set customer expectations. The change explains that Terminal Logger, which became the default in interactive sessions starting with .NET 9, shows limited output regardless of the verbosity level setting.
- Updated documentation to clarify that Terminal Logger limits output at all verbosity levels
- **`-v|--verbosity <LEVEL>`** | ||
|
||
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). | ||
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`. Terminal Logger (see --tl), which is the default in interactive sessions starting in .NET 9, shows limited output at all verbosity levels. For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and [WarningLevel](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel). |
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.
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`. Terminal Logger (see --tl), which is the default in interactive sessions starting in .NET 9, shows limited output at all verbosity levels. For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and [WarningLevel](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel). | |
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`. Terminal Logger (see `--tl`), which is the default in interactive sessions starting in .NET 9, shows limited output at all verbosity levels. For more information, see <xref:Microsoft.Build.Framework.LoggerVerbosity> and [WarningLevel](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel). |
|
||
[!INCLUDE [tl](../../../includes/cli-tl.md)] | ||
|
||
- **`-v|--verbosity <LEVEL>`** |
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.
@JanProvaznik one thing I've been doing for options that are used across multiple commands is to use and reference includes files. I have an open PR out doing cleanup like that across the commands: https://github.com/dotnet/docs/pull/48787/files.
Could you update the includes file at: ../../../includes/cli-verbosity.md
with your updated description and link to that here instead?
- **`-v|--verbosity <LEVEL>`** | |
`[!INCLUDE [verbosity](../../../includes/cli-verbosity.md)]` |
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.
@meaghanlewis @JanProvaznik this note would only be valid for dotnet
CLI commands that use MSBuild - we use the same values for --verbosity
across the CLI, but that value is interpreted different ways.
So ideally we'd have two (at least?) descriptions/snippets for verbosity that could be shared:
- verbosity for msbuild-using commands
- verbosity for non-msbuild-using commands
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.
@baronfel can you help me out by confirming which CLI commands use MSBuild. I believe it's:
- build
- clean
- pack
- publish
- restore
- test
Summary
Document the using the option is less impactful than customers would expect.
Fixes dotnet/msbuild#12465
Internal previews