dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.73k stars 1.07k forks source link

.NET 9 terminal logger litters output with "Build succeeded" on commands that do not build anything #44848

Open plioi opened 5 days ago

plioi commented 5 days ago

Describe the bug

After upgrading to the .NET 9 SDK, build scripts issuing dotnet commands litter the output with Build succeeded in X.Xs even for commands other than dotnet build.

To Reproduce

For an example, see build.ps1 in a representative repo at https://github.com/fixie/fixie/blob/ca6aac79f8a6dcec2b4abf58c537abca94a2b251/build.ps1

Proof that this output did not happen before can be seen in the Build section of this github actions job: https://github.com/fixie/fixie/actions/runs/11688386793/job/32548703947

This change to the output can only be confusing for non-build commands, and if we have to start littering all of our commands with something extra to suppress it by adjusting verbosity (and accidentally suppress substantive other details), then the phasing out of the explicit --tl was a net loss.

Further technical details

λ dotnet --info
.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.c6f19616
 MSBuild version:   17.12.7+5b8665660

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.100\

.NET workloads installed:
 [aspire]
   Installation Source: VS 17.12.35506.116
   Manifest Version:    8.2.2/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
   Install Type:              Msi

Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4
plioi commented 5 days ago

The behavior is varying by environment. Here is a far simpler library where the behavior is as I described above when I run locally, but in github actions the behavior is correct. Both running .NET 9 SDK with confirmation in the Actions log using dotnet --info: https://github.com/fixie/fixie.assertions/actions/runs/11824888740/job/32947429874?pr=12