How to troubleshoot a VSTO addin that does not load?

Here's a bit more detail on RobertG5's solution (too long for a comment):

The problem was that the add-in had been hard disabled by Outlook. As I've learned, that's something different than the "usual" not-loading scenario. The key to realizing this was to notice that the add-in did not show up under Inactive Application Add-Ins, but rather under Disabled Application Add-Ins. That makes a difference: In the latter case, just going to the COM-AddIn screen and ticking the check box just does nothing. (I guess a nice message box "You cannot load this add-in because it has been hard-disabled" would be too much to ask... sigh.)

So, how do I re-enable a hard disabled add-in?

  1. In the Manage box, change COM Add-ins to Disabled Add-ins, and then click Go.
  2. Select the add-in and click Enable. Click Close.

OK, now the add-in can be loaded again:

  1. In the Manage box, change Disabled Add-ins to COM Add-ins, and then click Go.
  2. select the check box next to the disabled add-in. Click OK.

Reference: http://msdn.microsoft.com/en-us/library/ms268871.aspx


Did you try enabling the add-in again? It won't run after its in the disabled queue. After you re-enable it from the disabled add-in screen, you can then check the box in the COM-AddIn screen to have it load which then should prompt you more detail since you set the VSTO_SUPPRESSDISPLAYALERTS variable about what may have happened in the first place.


I know this is old but for various reasons I've recently been troubleshooting Office Add-Ins that dont load.

Its chewed up heaps of time so I thought I'd share, so if your add-in wont load or its not visible or etc please try these solutions.

1. The Add-In is not loaded.

Not loaded. A runtime error occurred during the loading of the COM Add-In.

enter image description here

The problem is due to missing .Net framework 3.5 or 4.0.

Note: If the Office version is 64-bit (x64), I only need .Net 4.0. However, if the office version is 32-bit (x86), I get the error after installing .Net 4.0, as well. Following this article, I installed .Net 3.5, and then it worked on the x86 Office!

Plus need to install VSTO Runtime 3.0 form here.

2. The Add-In is not loaded.

Double check you have spelt the registry keys correctly. Occassionally I type Behaviour but in American spelling is Behavior, so double check "LoadBehavior"

enter image description here

Also make sure "LoadBehavior" is 3, for a list of values see http://msdn.microsoft.com/en-us/library/vstudio/bb386106.aspx#LoadBehavior

3. The Add-In is not visible.

You can make the add-In visible by going to Excel > File > Options > Add-Ins > select the Manage dropdownlist and set it to COM Add-Ins > Click GO. In the COM Add-Ins dialog make sure that Add-In is ticked.

4. The Add-In was disabled.

Alternatively the add-in may be hidden because it has been disabled. You can enable the add-In by going to Excel > File > Options > Add-Ins > select the Manage dropdownlist and set it Disabled and click GO. Select the Add-In that has been disabled and click Enable.

enter image description here

5. The ExcelDNA User Defined Formula is not rendering correctly

Instead of seeing the cell value you see: #NAME?

Set the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\options\OPEN:

With the correct value:

/R "C:\Program Files\XYZ\XYZ Addin\ExcelDNA.XYZAddIn.xll"

6. Excel HANGS after showing a messagebox

Turn back on the application settings:

xlApp.ScreenUpdating = true;
xlApp.DisplayAlerts = true;
xlApp.Calculation = XlCalculation.xlCalculationAutomatic;
xlApp.UserControl = true;
xlApp.EnableEvents = true;

7. Further troubleshooting

Enable your VSTO log file by adding the following on your system environment variables:

NAME: VSTO_LOGALERTS
VALUE: 1

There might be an exception error that is why your add-in is not loading.

You can check this source for more info on VSTO logging and alerts, but in essence you change two environment variable values depending on what you need to do:

Displaying VSTO Alert Prompts

To display each error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0 (zero). You can suppress the messages by setting the variable to 1 (one).

Logging VSTO Alerts to a Log file

To write the errors to a log file, set the VSTO_LOGALERTS variable to 1 (one).

Visual Studio Tools for Office creates the log file in the folder that contains the application manifest. The default name is .manifest.log. To stop logging errors, set the variable to 0 (zero).