It can be handy to write messages to custom output window/s…
Here is some code to do that:
Usage
EnvdteHelpers.WriteMsgToCustomPane("WCF", "Hello");
Helper
public static class EnvdteHelpers { private static OutputWindowPane _outputWindowPane; private static OutputWindowPane OutputWindowPane(string paneName) { return _outputWindowPane ?? (_outputWindowPane = CreateOutputWindowPane(paneName)); } private static OutputWindowPane CreateOutputWindowPane(string paneName) { var dte = (DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE"); var outputWindow = (OutputWindow)dte.Windows.Item(EnvDteConstants.VsWindowKindOutput).Object; OutputWindowPane pane; try { pane = outputWindow.OutputWindowPanes.Item(paneName); } catch (Exception) { pane = outputWindow.OutputWindowPanes.Add(paneName); } outputWindow.Parent.Activate(); pane.Activate(); return pane; } //http://blogs.msdn.com/b/mshneer/archive/2009/12/07/interop-type-xxx-cannot-be-embedded-use-the-applicable-interface-instead.aspx internal abstract class EnvDteConstants { public const string VsWindowKindOutput = "{34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3}"; } ///Usage: EnvdteHelpers.WriteMsgToCustomPane("WCF", "Hello"); public static void WriteMsgToCustomPane(string paneName,string message) { OutputWindowPane(paneName).OutputString(message + "\r\n"); } }