Visual Studio waits for the prebuild/postbuild script to complete to show the output. Is there an option to force it to flush on new line for example?
I tested the behaviour with VS2010 and a small C# script started in a postbuildStep. My script writes several lines to the console, waiting 200ms after each line.
Yes. The output comes flushed in the output window, when the subprocess finishes.
Adding a manual Flush() after each WriteLine in the script does not help.
So this is a behaviour, I've seen, when starting a subprocess and consuming the console output via a simple ReadToEnd(). A correct implementation should use ReadLineAsync()
Seems to be standard behaviour in Visual Studio. I guess this is the way it was implemented in VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With