Console.WriteLine not showing up from AspNetCore http handler #4860
Open
Description
Repro:
git clone https://github.com/mxschmitt/dotnet-nunit-asp-console-writeline
cd dotnet-nunit-asp-console-writeline
dotnet test --logger:"console;verbosity=detailed"
Expected: All the 8 WriteLine
calls are getting shown
Actual: they are not getting shown
Notes:
- It looks like that the ExecutionContext is getting lost
- I have a "hack" inside which makes it work and demonstrates the bug, maybe its a known limitation:
It seems related to #4728 - when I apply the same fix to the repro of #4728 its also working as expected.
Feel free to move / fold it into another issue. I filed it mostly for the sake of sharing the research.