Open tmds opened 5 months ago
Tagging subscribers to this area: @dotnet/area-system-console See info in area-owners.md if you want to be subscribed.
@nohwnd this sounds like one you'll be interested in.
@tmds have you tried with VSTestUseMSBuildOutput=false dotnet test
? I think that might disable the change that's causing you trouble.
have you tried with VSTestUseMSBuildOutput=false dotnet test? I think that might disable the change that's causing you trouble.
This doesn't seem to make a difference.
When I run as dotnet build -t:test
the output is showing, but it still behaves unexpected.
For example, the test should print:
System.Text.ConsoleEncoding
'ΠΣ'.
Did you see Pi and Sigma or question marks? [y/n]
But the last line is not printed until I press a key.
The last line is different from the previous line as it uses Console.Write
instead of Console.WriteLine
.
There may be some line buffer that is not printing this line until it sees the end of the line char.
Looking at global.json net9-preview1 is used, dotnet test integration with terminal logger is super basic there. It is better in preview2, but similarly to other build workloads, console.write/writeline might not propagate to console.
The new dotnet test experience can be disabled by this env variable: MSBUILDENSURESTDOUTFORTASKPROCESSES=1 or by -p:VSTestUseMSBuildOutput=false on command line.
Reopening to track question https://github.com/dotnet/runtime/pull/100333#discussion_r1578263569.
There are some instructions on how to run the Console manual tests: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Console/tests/ManualTests/Readme.md
In the past, I've successfully used these instructions to run the tests. It seems this is no longer working.
blocks without showing test output.
The change in behavior is possibly due to changes in msbuild for the terminal logger and/or related changes in vstest.
cc @dotnet/area-system-console @baronfel @rainersigwald