dotnet / dotnet/sdk

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

Open
#44,848 2 comments 3 reactions 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### 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

- `dotnet clean...` is now followed by "Build succeeded in..." where it was not before.
- `dotnet $fixie...` where $fixie is the path to a built dll, simply executing it, is now followed by **TWO** occurrences of "Build succeeded in..." where none were output before. I suspect this is because the first invocation is the one witnessed in the build script, and then the second is likely because the invoked executable itself is issuing a `dotnet` command to run a secondary dll in the same fashion via `ProcessStartInfo`.
- `dotnet pack...` is now followed by "Build succeeded in..." where it was not before.

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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.