开发者

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:

  1. I didn't put the package GUID on the <Commands> node in the .VSCT file.
  2. 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>-->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜