Skip to content

Consolidate default verbosity of msbuild-based commands #50243

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jjonescz
Copy link
Member

Fixes #50227.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Aug 13, 2025
@jjonescz jjonescz marked this pull request as ready for review August 13, 2025 14:48
@jjonescz jjonescz requested review from Copilot and a team August 13, 2025 14: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 consolidates the default verbosity setting for MSBuild-based commands to ensure consistent behavior across the dotnet CLI. The change addresses issue #50227 by centralizing the default verbosity configuration.

  • Introduces a centralized DefaultVerbosity constant set to VerbosityOptions.m
  • Updates VirtualProjectBuildingCommand to use the centralized default instead of hardcoded quiet verbosity
  • Adds comprehensive tests to verify verbosity behavior for run, build, and compilation diagnostic scenarios

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs Defines centralized DefaultVerbosity constant and updates class to be sealed
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs Updates to use centralized default verbosity instead of hardcoded quiet
src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildArgs.cs Minor cleanup removing unused using statement and empty XML doc return tag
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Adds tests for verbosity behavior in run, build, and compilation diagnostic scenarios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dotnet build app.cs doesn't work correct with .NET 10 P7
2 participants