Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force VS2015 flush prebuild/postbuild output?

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?

like image 522
f0rt Avatar asked Feb 03 '26 02:02

f0rt


1 Answers

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.

like image 67
mrAtari Avatar answered Feb 05 '26 16:02

mrAtari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!