msbuildcmdprogress-baroutput-window

Separate layers for printing in console output window


I'm developing a custom logger for MSBuild (C# project) to track the progress of building a big solution file. I want to show the progress in a fixed position in the command window (say top-left), while normal build messages are being printed out. Ideally, this can be accomplished by printing the progress in a fixed position, on a 'transparent' layer which sits on top of msbuild messages layer. However, my brief search didn't result in anything similar to what I wanted.

Does anyone have a suggestion/workaround for this?

Thanks


Solution

  • I've done something similar by programmatically creating a simple WinForm with a ProgressBar, i.e. when building locally (Environment.UserInteractive) show the progress bar (STAThread) otherwise just log normally, e.g. when built by CI.