John Dauphiny
John Dauphiny

Reputation: 45

VSTO Excel add-in auto disables

I have a signed VSTO vb.net add-in that is loaded into Excel 2013. There are roughly 200 users, and 90% are having no issues. For the 10%, every time they boot Excel, the add-in is soft disabled.

I have stood next to them as they boot XL, go into COM Add-ins, check the add-in, and click ok. It loads (and works fine) without error. They then quit XL, boot XL again, and the add-in is again disabled. No "An add-in was causing issues dialog", no errors, just disabled -- if you click on the add-in name in COM Add-ins, there is no indication of any error in the Load Behavior (just "Load at Startup"). They re-enable and it works fine for that session.

The fact that it's a subset of people makes me believe it's a setting on their machine (perhaps in the Trust Center?) but I have yet to find a guilty setting. All users have the same version of Windows, and should be on the same update.

My Google searches have found lots of entries for add-ins that are misbehaving or where the Trust settings are very restrictive -- from what I can see, neither of those categories fit. I found one article that talked about the boot order with Analysis Toolpak, but none of the users assisted had Toolpak enabled.

Being that no error (either from the add-in or Excel) are displayed, I've been at a loss as to why it turns off (and why it's working perfectly on 90% of the machines).

I would appreciate thoughts on either what to look at in my code (even though there are no errors visible) or what settings to attempt.

Upvotes: 1

Views: 700

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49397

For the 10%, every time they boot Excel, the add-in is soft disabled.

There can be a lot of reasons why your add-in is disabled automatically.

  1. First of all, I'd suggest checking the list of prerequisites - whether they all were installed correctly (including the .net runtime)

  2. Then I'd recommend enabling any logging mechanisms to look for any unexpected exceptions fired at startup.

  3. There may be a conflict with other add-ins that are being loaded in the Office application. Disable all other Add-Ins except the one in question and retry.

  4. The Antivirus on the system may be blocking the Add-In load. Run latest updates for the Antivirus and retry. If this doesn’t help, disable the Antivirus program completely and retry. Sometimes the Antivirus software also installs additional Office add-in, you may need to disable these additionally by running through the Antivirus control panel (Settings).

Visual Studio Tools for Office can write all errors that occur during startup to a log file or display each error in a message box. By default, these options are turned off for application-level projects. You can turn the options on by adding and setting environment variables. 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). 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).

Read more about possible pitfalls in the following articles:

Upvotes: 1

Related Questions