Any ideas what could cause IVsOutputWindowPane.Activate to fail with E_UNEXPECTED error code.
In my case the code is something like this:
Guid buildPaneGuid = VSConstants.OutputWindowPaneGuid.BuildOutputPane_guid;
IVsOutputWindowPane pane;
outputWindow.GetPane(ref buildPaneGuid, out pane);
OutputPane = pane;
...
//
// Here I dispatch the action to the UI thread
//
Dispatcher.BeginInvoke(DispatcherPriority.Send,
new Action(() =>
{
OutputPane.Activate(); // E_UNEXPECTED
....
}));Typically when this happen I don't see the "Build" entry in the "Show Output from"