title: How do I sort build output of Visual Studio by Build Order by default?
body: <p>I know that I could sort the build output of my multicore builds in Visual Studio using the <strong>Build Order</strong> item in the <strong>Output</strong> window (as described <a href="https://stackoverflow.com/questions/192561/is-there-a-visual-studio-plugin-for-sorting-build-output-scrambled-from-multi-t">here</a>).</p>
  <p>But once I've done that and hit <kbd>F7</kbd> again, the option switches back to <strong>Build</strong> and I have to switch back to <strong>Build Order</strong> again.</p>
  <p>Is there a way to set <strong>Build Order</strong> as default setting in the <strong>Output</strong> window?</p>
  <p>Searching a bit shows me that this question was asked several times but never answered:</p>
  <ul>
  <li><a href="http://ntcoder.com/bab/2009/06/02/ordering-output-of-out-of-order-builds-in-visual-studio/#comment-484" rel="nofollow noreferrer">http://ntcoder.com/bab/2009/06/02/ordering-output-of-out-of-order-builds-in-visual-studio/#comment-484</a></li>
  <li><a href="http://blogs.msdn.com/b/zainnab/archive/2010/07/03/show-the-output-window-during-build-vstiptool0045.aspx#comments" rel="nofollow noreferrer">http://blogs.msdn.com/b/zainnab/archive/2010/07/03/show-the-output-window-during-build-vstiptool0045.aspx#comments</a></li>
  <li><a href="http://weblogs.asp.net/scottgu/archive/2005/10/21/428094.aspx#1451451" rel="nofollow noreferrer">http://weblogs.asp.net/scottgu/archive/2005/10/21/428094.aspx#1451451</a></li>
  </ul>
  <hr />
  <p><strong>Edit:</strong><br />
  The <a href="https://stackoverflow.com/a/14377496/520162">answer</a> given by <a href="https://stackoverflow.com/users/403671/simon-mourier">Simon</a> works for me (or at least it points me to the right direction), but I could not simply copy his code and insert it in my <code>MyMacros</code> project. Instead, I have to create the handler for the build events <strong>exactly</strong> as described <a href="http://msdn.microsoft.com/en-us/library/0b27f9kz%28v=vs.80%29.aspx" rel="nofollow noreferrer">here</a>:</p>
  <blockquote>
  <ol>
  <li><p>On the <strong>Class View</strong> explorer pane, in the Macros IDE, double-click the <strong>EnvironmentEvents</strong> node to display it as an <strong>EnvironmentEvents</strong> tab
  and a drop-down menu on the macro editor pane.</p>
  </li>
  <li><p>From the <strong>EnvironmentEvents</strong> drop-down menu, select an events type, such as <strong>TaskListEvents</strong>. The <strong>Declarations</strong> combo box is now populated
  with the available <strong>Task List</strong> events.</p>
  </li>
  <li><p>On the <strong>Declarations</strong> drop-down menu, select an event, such as <strong>TaskAdded</strong>, to add its event procedure to the module.</p>
  </li>
  </ol>
  <p>The event is inserted into your macro and you can now add code to the event procedure.</p>
  </blockquote>
  <p>Otherwise, the event handler isn't called at all.</p>