locked
Problem writing an Addin with buttons in the toolbar. RRS feed

  • Question

  • Hi,

    Sorry if this is really obvious but I can't get anywhere with the help about writing new extensions.

    I am trying to develop some simple utilities for automating some code writing in C++ Visual Studio 2012.

    I have created an AddIn project and copied the code given in 'How to: Expose an Add-In as a Button on the Toolbar'. When I build it and run it in debug I see the new  button but it is disabled. Note I have 'activated it in the 'Tools\Add-in Manager'

    How do I enable it?

    When I restart Visual studio after the test addin was left activated in the 'Tools\Add-in Manager' then I get error about the command already being present!

    Any Ideas?

    Tuesday, October 9, 2012 2:21 PM

Answers

  • Hi,

    For add-ins (not packages), you have lots of resources on my web page:

    http://www.mztools.com/resources_vsnet_addins.aspx

    You have a section about troubleshooting, with this article of interest that mentions your issue (5. The commands and buttons are created, but they appear disabled):

    HOWTO: Troubleshooting Visual Studio and Office add-ins

    About the second issue, to add commands and buttons correctly see these two articles:

    HOWTO: Use correctly the OnConnection method of a Visual Studio add-in

    HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from an add-in.


    MZ-Tools: Productivity add-ins for Visual Studio: http://www.mztools.com. My blog about developing add-ins: http://msmvps.com/blogs/carlosq/

    • Marked as answer by AndrewHAL Wednesday, October 10, 2012 7:46 AM
    Tuesday, October 9, 2012 3:27 PM