OutputWindowPane.OutputString Method
Visual Studio 2005
Sends a text string to the OutputWindowPane window.
Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)
Assembly: EnvDTE (in envdte.dll)
public void OutputStringExample(DTE2 dte) { // Find and show the "Test Pane" Output window pane. OutputWindow outputWin = dte.ToolWindows.OutputWindow; OutputWindowPane pane; try { pane = outputWin.OutputWindowPanes.Item("Test Pane"); } catch (Exception) { pane = outputWin.OutputWindowPanes.Add("Test Pane"); } outputWin.Parent.Activate(); pane.Activate(); // Add a line of text to the new pane. pane.OutputString("Some text." + "\r\n"); }