locked
VSTO custom ribbon button only loading in debug RRS feed

  • Question

  • So I created a VSTO plugin for Outlook 2007 and have it creating a button on the command bar for explorers and a ribbon group/button in inspectors.  For the latter, I added a Ribbon Support item to the project, configured the XML, put in all the event handlers and it ran like a charm.  From Visual Studio (2005).  So I put together a deployment package and installed it to make sure it ran for a normal installation.

    The ribbon button doesn't load up.  I get the button on the toolbar, but not the ribbon button.  I threw some message boxes into the code and tried it out again, and it looks like the RequestService override in the partial class created by the ribbon support item is not firinig in the compiled version.  I am seeing it hit the NewInspector event properly in the plugin, and I can have it add a button to the "add ins" tab of the ribbon for a mail item.  And both that button as well as the one on the explorer command bar work properly when clicked.

    So it shouldn't be a CAS issue, but maybe its a pre-req issue?  The machine is the same one I'm running VS on (I'm disabling the instance of the addin from my bin folder and enabling the installed one from Program Files to toggle back and forth); could that be the issue?  Or is there something special I need to do to my deployment and/or project so that when it compiles everything works right?
    Thursday, May 28, 2009 8:47 PM

Answers

  • Hello,

    I don't think this is a pre-req issue, if you were sure of that your add-in is actually running on your system the ribbon support should works too, it's weird, please try put some try catch in your code, and make sure you have only overried RequestService method once.

    Also a fresh install of your add-in is worth to try.

    Thanks

    We have published a VSTO FAQ recently, you can view them from the entry thread VSTO FAQ.
    If you have any feedbacks or suggestions on this FAQ, please feel free to write us emails to colbertz@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Tim Li Friday, June 5, 2009 2:37 AM
    Wednesday, June 3, 2009 9:39 AM
  • Are you sure your Ribbon XML is valid, in Outlook select tools -> Options -> and then select the "Other" tab then click advanced options and you will see two options that are useful to know.

    a) Show Developer Tab in Ribbon
    b) Show Addin Interface Errors

    Tick these two options and you may find that there is something showing what maybe wrong.

    Do the command bars appear and it is only the Ribbon that fails at switching at runtime, can you confirm for sure this is not two addins trying to run at the same time.?

    Regards
    Mike Walker MVP - Visual Developer VSTO - Please mark the best replies as Answers !
    • Marked as answer by Tim Li Friday, June 5, 2009 2:38 AM
    Wednesday, June 3, 2009 1:51 PM

All replies

  • Hello,

    I don't think this is a pre-req issue, if you were sure of that your add-in is actually running on your system the ribbon support should works too, it's weird, please try put some try catch in your code, and make sure you have only overried RequestService method once.

    Also a fresh install of your add-in is worth to try.

    Thanks

    We have published a VSTO FAQ recently, you can view them from the entry thread VSTO FAQ.
    If you have any feedbacks or suggestions on this FAQ, please feel free to write us emails to colbertz@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Tim Li Friday, June 5, 2009 2:37 AM
    Wednesday, June 3, 2009 9:39 AM
  • Are you sure your Ribbon XML is valid, in Outlook select tools -> Options -> and then select the "Other" tab then click advanced options and you will see two options that are useful to know.

    a) Show Developer Tab in Ribbon
    b) Show Addin Interface Errors

    Tick these two options and you may find that there is something showing what maybe wrong.

    Do the command bars appear and it is only the Ribbon that fails at switching at runtime, can you confirm for sure this is not two addins trying to run at the same time.?

    Regards
    Mike Walker MVP - Visual Developer VSTO - Please mark the best replies as Answers !
    • Marked as answer by Tim Li Friday, June 5, 2009 2:38 AM
    Wednesday, June 3, 2009 1:51 PM