Note that there are some explanatory texts on larger screens.

plurals
  1. POCommand bar control won't show up
    primarykey
    data
    text
    <p>we developed an AddIn for Visual Studio 2008 which installs a command bar item in the "Project" context menu (right click on a project in solution explorer). The following, simplified code (in Connect.cs) works fine for all of our machines except one:</p> <pre><code>object[] contextGUIDS = new object[] { }; string commandName = "My_Command"; string tooltip = "My tooltip"; Command projectCommand = applicationObject.Commands.AddNamedCommand(addInInstance, commandName, commandName, tooltip, false, 1, ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported + (int)vsCommandStatus.vsCommandStatusEnabled); CommandBars commandBars = (CommandBars)(fApplicationObject.CommandBars); CommandBar projectCommandBar = commandBars["Project"]; CommandBarControl projectButton = (CommandBarControl)(projectCommand.AddControl(projectCommandBar, projectCommandBar.Controls.Count + 1)); projectButton.Caption = "My caption"; projectButton.TooltipText = tooltip; </code></pre> <p>On one single machine, the code will run without an exception, but the button won't show up. Invoking the installation code once more will throw an exception because of an already existing command bar item. However, another item, which should be located in the "Tools" menu is installed and shown properly.</p> <p>Even though the OS and Visual Studio have been re-installed, the problem still remains (Windows 7 x86 SP1 German, Visual Studio Development Edition SP1 English). We have other machines with the same OS and VS configuration, but the button shows up there properly.</p> <p>Any hints on this topic are welcome!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload