Skip to content
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

NET 9: Redirecting the output of 'dotnet run' command adds escape characters at the beginning of file: ]9;4;3;\]9;4;0;\ #109815

Closed
indrajitjadeja opened this issue Nov 14, 2024 · 2 comments
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Comments

@indrajitjadeja
Copy link

Description

When redirecting the output of dotnet run command on windows command prompt or Windows power shell, it prints the below escape characters at the beginning of the file

�]9;4;3;�\�]9;4;0;�\

Reproduction Steps

Open a windows command prompt or Windows power shell and follow below commands

C:\nt9\testit>dotnet --version
9.0.100

C:\nt9>dotnet new console -o testit

C:\nt9>cd testit

C:\nt9\testit>dotnet run
Hello, World!

C:\nt9\testit>dotnet run > nt9.log

C:\nt9\testit>notepad nt9.log

nt9.log

Expected behavior

It should print the redirected output without escape characters at the beginning of the file.

Actual behavior

'nt9.log' file content :

�]9;4;3;�\�]9;4;0;�\Hello, World!

Regression?

Using .NET 8 SDK, such issue does not replicate.

C:\nt8>dotnet new globaljson --sdk-version 8.0.202
The template "global.json file" was created successfully.

C:\nt8>dotnet new console -o testit

C:\nt8>cd testit

C:\nt8\testit>dotnet --version
8.0.202

C:\nt8\testit>dotnet run
Hello, World!

C:\nt8\testit>dotnet run>nt8.log

C:\nt8\testit>notepad nt8.log

'nt8.log' file content:

Hello, World!

nt8.log

Known Workarounds

No response

Configuration

.NET version: 9.0.100
OS and version : Windows 11 Enterprise 21H2
Arch: x64

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 14, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 14, 2024
@indrajitjadeja indrajitjadeja changed the title NET 9: Redirecting the output of dotnet run adds escape characters at the beginning of file: ]9;4;3;\]9;4;0;\ NET 9: Redirecting the output of 'dotnet run' command adds escape characters at the beginning of file: ]9;4;3;\]9;4;0;\ Nov 14, 2024
@huoyaoyuan
Copy link
Member

Duplicate of dotnet/msbuild#10998

@vcsjones
Copy link
Member

Thanks for taking the time to report an issue. Based on @huoyaoyuan's comment, I am going to close this issue as a duplicate, as the other issue was pre-existing and is likely a better place for the issue to reside.

@vcsjones vcsjones closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Nov 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

No branches or pull requests

3 participants