Skip to content

dotnet test with terminal logger disables color output on detailed output #48581

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
rudism opened this issue Apr 18, 2025 · 0 comments
Open
Labels
Area-dotnet test untriaged Request triage from a team member

Comments

@rudism
Copy link

rudism commented Apr 18, 2025

Describe the bug

When running dotnet test --logger="console;verbosity=detailed" with the terminal logger enabled, the color output (specifically the Passed/Failed/Skipped text which is usually green/red/yellow) gets lost. The project I am testing against is an MSTest project.

To Reproduce

Running with terminal logger enabled (by default) gives colorless test result output like this:

dotnet test --logger="console;verbosity=detailed"

Image

Disabling the terminal logger with -tl:off restores the colored output:

dotnet test -tl:off --logger="console;verbosity=detailed"

Image

Further technical details

Output of dotnet --info:

.NET SDK:
 Version:           9.0.200
 Commit:            90e8b202f2
 Workload version:  9.0.200-manifests.b4a8049f
 MSBuild version:   17.13.8+cbc39bea8

Runtime Environment:
 OS Name:     void
 OS Version:  
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/rudism/dotnet/sdk/9.0.200/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.2
  Architecture: x64
  Commit:       80aa709f5d

.NET SDKs installed:
  5.0.408 [/home/rudism/dotnet/sdk]
  6.0.424 [/home/rudism/dotnet/sdk]
  7.0.404 [/home/rudism/dotnet/sdk]
  8.0.401 [/home/rudism/dotnet/sdk]
  9.0.100 [/home/rudism/dotnet/sdk]
  9.0.200 [/home/rudism/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.17 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.32 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.14 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.8 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.2 [/home/rudism/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.17 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.32 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.14 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.8 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.2 [/home/rudism/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/home/rudism/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-dotnet test untriaged Request triage from a team member labels Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-dotnet test untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant