1
votes

I have an Outlook 2010 add in (VS 2015) which I'm having issues debugging as it appears to be running on load but not hitting breakpoints up to a point, then it runs again with breakpoints being hit. The double running is causing issues with an updating mechanism in the code.

Specifically, I have a myProjectRibbon.cs file and a ThisAddIn.cs file (+ rest of project).

myProjectRibbon.cs file contains a private void MyRibbon_Load(object sender, RibbonUIEventArgs e) function.

ThisAddin.cs contains the private void ThisAddIn_Startup(object sender, System.EventArgs e) function.

I've put breakpoints all over these events and Outlook will open, load the addin (not triggering break points but it is executing the functions I've got break points on) then control goes back to Outlook and the Ribbon file then triggers, then the ThisAddin file triggers.

Any ideas on how to check the code that the addin is executing or why the breakpoints aren't being hit first time through?

Any help greatly appreciated.

1
Can you make sure that the binaries in your project's output folder are the ones registered as add-in in Outlook? You should see the actual location loaded in Outlook via File > Options > Add-insDirk Vollmar
Do you run it in Debug mode?PetLahev
@PetLahev - yes I'm running it in Debug mode, it skips past the breakpoints,loads once and then loads a second time.gorlaz
@DirkVollmar - will check that thanksgorlaz

1 Answers

0
votes

To check the code your addin is executing

  • Launch your regedit.exe, then browse to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins (or wow6432node for 64bit)
  • Find the addin in question, check its loadbehaviour
  • Check the path in the Manifest to see the code being executed