How to sort Visual Studio assembly output by default assembly order?

I know that I could sort the build output of my multi-core builds in Visual Studio using the Build Order item in the Exit window (as described here ).

But as soon as I did this and again uninstall F7 , the option will switch to Build , and again I need to go back to Build order .

Is there any way to set the Build Order as the default value in the Output window?

The search shows me a little that this question was asked several times, but it never answered:


Edit:
The answer given by Simon works for me (or at least points in the right direction), but I could not just copy its code and paste it into the MyMacros project. Instead, I need to create an assembly event handler exactly as described here :

  • In the Class View Explorer pane of the Macros IDE, double-click the EnvironmentEvents node icon to display it as the EnvironmentEvents tab and drop-down menu in the macro editor pane.

  • From the EnvironmentEvents drop-down menu, select an event type, such as TaskListEvents . The Announcement layout is now populated with the available Task List events.

  • In the Announcements drop-down menu, select an event, for example TaskAdded , to add its procedure to the module.

The event is inserted into your macro, and now you can add code to the event procedure.

Otherwise, the event handler is not called at all.

+6
source share
1 answer

You can 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 into the MyMacros module, EnvironmentEvents.

+2
source

All Articles