MSBuild custom task: how to clear logging in VS2012 output window during task execution?

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

My problem is that all output is not displayed in the VS2012 output window until the task is completed, making changes in the course of execution useless. I want the output to appear while the task is running.

I found several threads explaining the frequent use of Application.DoEvents() , but this does not seem to solve the problem (maybe it only applies to VS2010 and earlier?).

+6
source share
2 answers

Known bug in VS2012.

As a result, we created the VSPackage extension for VS2012 / 2013 (for direct output in the panel log).

It is fixed in VS2015.

0
source

This is a bug in VS 2012. In the comments on this error message, a user whose nickname Will, speaking on behalf of Microsoft, wrote on July 2, 2013 that Though we will not have a chance to address this issue in Visual Studio 2012, we will consider this feedback when planning for future versions of Visual Studio.

0
source

Source: https://habr.com/ru/post/945571/


All Articles