Example #1
0
        private async Task <IVsOutputWindowPane> CreateOutputWindowPaneAsync()
        {
            await _threadingService.SwitchToUIThread();

            IVsOutputWindow outputWindow = _outputWindow.Value;

            if (outputWindow == null)
            {
                return(null);    // Command-line build
            }
            Guid activePane = outputWindow.GetActivePane();

            IVsOutputWindowPane pane = CreateProjectOutputWindowPane(outputWindow);

            // Creating a pane causes it to be "active", reset the active pane back to the previously active pane
            if (activePane != Guid.Empty)
            {
                outputWindow.ActivatePane(activePane);
            }

            return(pane);
        }