-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Good First IssueSelf-contained issues good for first-time contributors.Self-contained issues good for first-time contributors.bugtriaged
Milestone
Description
Issue Description
Requesting a binary log (/bl) will print a line to the terminal which isn't printed otherwise (when doing quiet builds).
Steps to Reproduce
$ msbuild test.csproj /bl /verbosity:quiet /nologo
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/15.0/bin/MSBuild.dll /nologo /bl /verbosity:quiet test.csprojExpected Behavior
Quiet builds should be quiet:
$ msbuild test.csproj /verbosity:quiet /nologo
[no output]Actual Behavior
An additional line of text (seems like the parsed MSBuild command line) is printed.
Analysis
I think the following two code blocks work together to cause this:
Lines 3184 to 3187 in f25c1ee
| // If we have a binary logger, force verbosity to diagnostic. | |
| // The only place where verbosity is used downstream is to determine whether to log task inputs. | |
| // Since we always want task inputs for a binary logger, set it to diagnostic. | |
| verbosity = LoggerVerbosity.Diagnostic; |
Lines 2344 to 2348 in f25c1ee
| if (verbosity == LoggerVerbosity.Diagnostic) | |
| { | |
| string equivalentCommandLine = commandLineSwitches.GetEquivalentCommandLineExceptProjectFile(); | |
| Console.WriteLine($"{Path.Combine(s_exePath, s_exeName)} {equivalentCommandLine} {projectFile}"); | |
| } |
The extra line of text is also printed when not enabling the binary logger, but using diagnostic verbosity (but none of the other verbosity levels).
Versions & Configurations
$ msbuild --version
Microsoft (R) Build Engine version 16.10.1 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
16.10.1.31401%
This also happens with dotnet build, so here's that version too:
$ dotnet --version
6.0.301
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Good First IssueSelf-contained issues good for first-time contributors.Self-contained issues good for first-time contributors.bugtriaged