dotnet run
writes the "Using launch settings from ..." message to stdout instead of stderr
#45640
Labels
untriaged
Request triage from a team member
Describe the bug
[On a Mac M1 using .NET 9.]
When using
dotnet run
to run a project that uses alaunchSettings.json
file, it writes a startup message like "Using launch settings from {filename}..." to stdout. Other run messages are written (correctly) to stderr. Because the message is written to stdout, it mixes in with the expect output of the program, often making it unparseable.To Reproduce
dotnet run > output.json
.output.json
and note that it is not valid JSON due to the message at the top.Further technical details
The errant line of code is here: https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/commands/dotnet-run/RunCommand.cs#L135.
The text was updated successfully, but these errors were encountered: