Why is the toolbar button disabled in my Visual Studio extension?
I've written a Visual Studio 2010 extension. It's a VS Package (in a .VSIX) file. It's got a toolbar, which has a single button on it.
The button is开发者_如何学JAVA never enabled. I've looked at the MenuAndCommands VS SDK example and, as far as I can tell, I'm not doing anything different.
What have I done wrong?
Seems to work now: could be one of two things:
- I didn't put the package GUID on the
<Commands>
node in the .VSCT file. - It appears that the .VSCT file is not always built when it should be. A rebuild all later, and it appears to be working...
I ran into this... problem was I had disabled the buttons in the vsct file, commenting out the DefaultDisabled solved the problem:
<Button guid="guidXYZCmdSet" id="XYZmd" priority="0x0007" type="Button">
<Parent guid="guidSXYZCmdSet" id="guidSXYZMenuGroup" />
<Icon guid="guidImages" id="bmpVS" />
<!--<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>DefaultDisabled</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>-->
精彩评论