Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom MSBuild Task: how to flush logging in VS2012 output window while task is still running?

I have a custom MSBuild task that takes some time to complete. It outputs progress using either Log.LogMessage() or BuildEngine.LogMessageEvent() (tried both).

My problem is that all output doesn't appear in VS2012 Output window until the task is completed, making progress updates useless. I would like to have output appearing while the task is running, right away.

I found various threads explaining to call frequently Application.DoEvents(), but that doesn't seem to solve the problem (maybe it only applied for VS2010 and before?).

like image 388
xen2 Avatar asked May 22 '13 11:05

xen2


1 Answers

Known bug in VS2012.

We ended up making a VSPackage extension for VS2012/2013 (to directly output in pane log).

It is fixed in VS2015.

like image 114
xen2 Avatar answered Oct 08 '22 21:10

xen2