C# 使Log.LogMessage消息在VS2013输出窗口中快速显示

C# 使Log.LogMessage消息在VS2013输出窗口中快速显示,c#,visual-studio,visual-studio-2013,msbuild,C#,Visual Studio,Visual Studio 2013,Msbuild,我在自定义MSBuild任务中有以下C#代码: Log.LogMessage(MessageImportance.High, string.Format("Downloading ROOT v{0}", Version)); // Do the download WebClient webClient = new WebClient(); webClient.DownloadFile(url, filePath); 下载文件实际上可能需要很长时间。足够长的时间,如果有人不知道发生了什么

我在自定义MSBuild任务中有以下C#代码:

 Log.LogMessage(MessageImportance.High, string.Format("Downloading ROOT v{0}", Version));
 // Do the download
 WebClient webClient = new WebClient();
 webClient.DownloadFile(url, filePath);
下载文件实际上可能需要很长时间。足够长的时间,如果有人不知道发生了什么,他们可能会试图杀死构建。因此,我在前面的行中转储了日志消息

当使用MSBUILD运行我的构建时,这将按预期工作。控制台上会出现“Downloading ROOT v5.34.20”,然后在下载过程中,所有内容都会暂停几分钟

但是,在VS2013中运行时,输出窗口在生成完成之前保持空白。然后显示正确的日志行(以正确的顺序)。看起来MSBUILD的输出在报告给VS2013的输出窗口之前已被缓冲


有没有办法改变这种行为?我想引起刷新,以便用户知道为什么他们的构建似乎已暂停…

确实,这似乎是同一个问题。