Outlook Add-In Automatically Setting Load Behavior to 2 RRS feed

  • Question

  • I've looked at a large number of posts regarding this issue, but none seem to have a true answer.

    My add-in creates and checks a contact list in the users Outlook upon Outlook startup. However, recently the add-in has been immediately been setting the LoadBehavior registry key to '2' and never actually running. 

    Are there any additional checks that I can run to see what's causing this? It used to work and only occasionally change behavior to '2', but now is doing it every time I load the app. 

    • Moved by CoolDadTx Friday, March 10, 2017 6:26 PM Office related
    Friday, March 10, 2017 5:42 PM

All replies

  • Hello Josh,

    Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.

    Hard disabling can occur when an VSTO Add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your VSTO Add-in is executing.

    Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing. Read more about that in the How to: Re-enable a VSTO Add-in That Has Been Disabled article.

    Outlook 2013 and above 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. Check out the following windows registry hive:


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Saturday, March 11, 2017 2:01 PM