I know that I could sort the build output of my multicore builds in Visual Studio using the Build Order item in the Output window (as described here).
But once I've done that and hit F7 again, the option switches back to Build and I have to switch back to Build Order again.
Is there a way to set Build Order as default setting in the Output window?
Searching a bit shows me that this question was asked several times but never answered:
Edit:
The answer given by Simon 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 MyMacros
project. Instead, I have to create the handler for the build events exactly as described here:
On the Class View explorer pane, in the Macros IDE, double-click the EnvironmentEvents node to display it as an EnvironmentEvents tab and a drop-down menu on the macro editor pane.
From the EnvironmentEvents drop-down menu, select an events type, such as TaskListEvents. The Declarations combo box is now populated with the available Task List events.
On the Declarations drop-down menu, select an event, such as TaskAdded, to add its event procedure to the module.
The event is inserted into your macro and you can now add code to the event procedure.
Otherwise, the event handler isn't called at all.
You could write a Visual Studio macro, something like this:
Dim WithEvents MyBuildEvents as BuildEvents
Private Sub BuildEvents_OnBuildBegin(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles MyBuildEvents.OnBuildBegin
OpenBuildOrderOutputPane()
End Sub
Private Sub OpenBuildOrderOutputPane()
Dim window As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput) ' Get Output Window
Dim output As OutputWindow = CType(window.Object, OutputWindow)
For Each pane As OutputWindowPane In output.OutputWindowPanes ' Browse panes
If (pane.Guid = "{2032B126-7C8D-48AD-8026-0E0348004FC0}") Then ' Build Order guid
pane.Activate()
End If
Next
window.Activate()
End Sub
You need to paste this code in MyMacros, EnvironmentEvents module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With