int IVsSolutionEvents.OnBeforeCloseSolution(object pUnkReserved) { foreach (Window window in _dte.Windows) { if (window.Type != vsWindowType.vsWindowTypeToolWindow) { continue; } if (!HostWindow.IsD365DevExWindow(window)) { continue; } OutputLogger.DeleteOutputWindow(); window.Close(); } OutputLogger.DeleteOutputWindow(); return(VSConstants.S_OK); }