1
votes

A bit of a strange one.

I'm learning how to create VSTO add ins for Outlook and I've barely done much and what I seem to have already done, causes Outlook to disable it as it takes too long to load. (Says it takes 1.57 seconds)

All I've literally done is:

  1. Created a new Project for Outlook 2013 and 2016 VSTO
  2. Added the ribbon add in by going to Project -> Add New Item
  3. Set the Ribbon type to Microsoft.Outlook.Explorer
  4. Added a button
  5. Press F5 to test

I'm more concerned that if I was to develop, will this VSTO take longer to generate?

1

1 Answers

2
votes

When you hit the F5 button on the keyboard the add-in is run under the debugger with non-optimized code. I'd suggest testing the RELEASE configuration of your add-in instead. In that case you will get an optimized assembly without debug symbols defined, so it should be run a lot faster.

The New in Outlook for developers page states the following:

Extending the add-in resiliency pillar of Outlook 2010, Outlook 2013 monitors add-in performance metrics such as add-in startup, shutdown, folder switch, item open, and invoke frequency. Outlook records the elapsed time in milliseconds for each performance monitoring metric.

For example, the startup metric measures the time required by each connected add-in during Outlook startup. Outlook then computes the median startup time over 5 successive iterations. If the median startup time exceeds 1000 milliseconds (1 second), then Outlook disables the add-in and displays a notification to the user that an add-in has been disabled. The user has the option of always enabling the add-in, in which case Outlook will not disable the add-in even if the add-in exceeds the 1000 millisecond performance threshold