In a Visual Studio extension, I have defined a Toolbar in my .vsct file as:
<Menu guid="guidVsCmdSet" id="MyToolbar" type="Toolbar" >
<CommandFlag>TextChanges</CommandFlag>
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>My Tools/ButtonText>
</Strings>
</Menu>
When I launch my extension in Visual Studio Experimental hive, I can open my Toolbar manually via right clicking in the CommandBar area.
Is there any way to have the toolbar show up by default when I first run the extension?
I have tried a couple other CommandFlags, but they did not seem to perform this behavior:
<CommandFlag>AlwaysCreate</CommandFlag>
<CommandFlag>DontCache</CommandFlag>
What you want to look at is Visibility Constraints. The below example uses GUID_TextEditorFactory which makes it visible when a text editor is active (and hide when, for example a designer is active).
I'm not 100% sure what the correct context is to make it always visible, but my guess is UICONTEXT_NoSolution (or maybe GUID_VSStandardCommandSet97).
Read about how to do that in this workaround: LVN! Sidebar #7 - Showing a toolbar at Visual Studio startup