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.74k stars 1.07k forks source link

unexpected control chracter output from dotnet run #45002

Open Dirk-Peters-BF opened 1 day ago

Dirk-Peters-BF commented 1 day ago

Describe the bug

Unexpected ASCII control characters are inserted in output when running "dotnet run" for a console project.

To Reproduce

docker run --rm -it mcr.microsoft.com/dotnet/sdk:9.0 bash
mkdir hello
cd hello
dotnet new console
dotnet run
apt update && apt install less
dotnet run | less

expected result: less shows "Hello, World!"

actual result: less shows: "ESC]9;4;3;ESC\ESC]9;4;0;ESC\Hello, World!"

Further technical details

.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.7+5b8665660

Runtime Environment:
 OS Name:     debian
 OS Version:  12
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/9.0.100/

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

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  9.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

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

Download .NET:
  https://aka.ms/dotnet/download
dotnet-issue-labeler[bot] commented 1 day ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dotnet-issue-labeler[bot] commented 1 day ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

KalleOlaviNiemitalo commented 1 day ago

This bug is being tracked in https://github.com/dotnet/msbuild/issues/10998.

Dirk-Peters-BF commented 1 day ago

Thanks. That explains why I did not find anything in "runtime" or here ...