Tips and Tricks for Troubleshooting Office Add-ins Part - 1
We can enable error logging and displaying of error message for the VSTO add-in by setting environment variables VSTO_SUPPRESSDISPLAYALERTS and VSTO_LOGALERTS.
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 <Manifestname>.manifest.log.
We can refer to the article mentioned below:
Visual Studio Tools for the Microsoft Office System : Debugging in Application-Level Projects
https://msdn.microsoft.com/en-us/library/ms269003(VS.80).aspx
Starting in Visual Studio 2008 Service Pack 1 (SP1) , you can use the event viewer in Windows to see error messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Visual Studio Tools for Office solutions. You can use these messages from the event logger to resolve installation and deployment problems.
You can enable the event logger by setting the VSTO_EVENTLOGDISABLED environment variable to "0".
Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0): Event Logging (2007 System)
https://msdn.microsoft.com/en-us/library/cc442816.aspx
We can also use AddinSpy to gather information for troubleshooting
Using AddinSpy and AS Diagnostic Tools for Microsoft Office Add-ins
https://msdn.microsoft.com/en-us/library/cc984533.aspx
We can also use VSTO Troubleshooter which is part of VSTO Power Tools. It is a diagnostic tool that examines a computer looking for the necessary prerequisites for running Visual Studio Tools for Office solutions.
Microsoft Visual Studio Tools for the Office System Power Tools v1.0.0.0
https://www.microsoft.com/downloads/details.aspx?FamilyId=46B6BF86-E35D-4870-B214-4D7B72B02BF9&displaylang=en
We can also have look at some troubleshooting techniques posted by my colleagues:
Praveen @ https://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshooting-com-add-in-load-failures.aspx
Comments
- Anonymous
October 10, 2008
The comment has been removed - Anonymous
February 01, 2009
When you set the VSTO_EVENTLOGDISABLED environment variable to "1" the event logging is disabled as per the article.