Skip to content

Conversation

JanProvaznik
Copy link
Member

@JanProvaznik JanProvaznik commented Oct 3, 2025

Summary

Document the using the option is less impactful than customers would expect.

Fixes dotnet/msbuild#12465


Internal previews

📄 File 🔗 Preview link
docs/core/tools/dotnet-build.md docs/core/tools/dotnet-build

Copy link
Contributor

@gewarren gewarren left a 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.

@JanProvaznik
Copy link
Member Author

@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.

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 09:48
Copy link
Contributor

@Copilot Copilot AI left a 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).
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
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>`**
Copy link
Contributor

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?

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

Copy link
Member

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

Copy link
Contributor

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

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.

Verbose output of dotnet build is not shown on console for .NET 9.0.304 SDK without redirection
4 participants