
Debugging Disabled Add-ins
Microsoft Office applications can disable add-ins that behave unexpectedly when they are being loaded. A Microsoft Office application disables add-ins to prevent problematic code from loading every time that the application starts. However, it is also easy to cause unexpected behavior during typical debugging. For information about how to re-enable add-ins, see How to: Re-enable an Add-in That Has Been Disabled.
There are two types of disabling that Microsoft Office applications use for add-ins: hard disabling and soft disabling.
Hard Disabling
Hard disabling occurs when code that runs when the add-in is loaded causes the application to close unexpectedly, or when you stop the debugger while the constructor or the Startup event handler is executing.
If a Microsoft Office 2003 application hard disables an add-in created by using Visual Studio Tools for Office, the application disables both the add-in and AddinLoader.dll. AddinLoader.dll is used to load add-ins created by using Visual Studio Tools for Office. As a result, all add-ins created by using Visual Studio Tools for Office for that Microsoft Office application are prevented from loading for the current user. For more information about AddinLoader.dll, see Architecture of Application-Level Add-Ins.
If a 2007 Microsoft Office system application hard disables an add-in created by using Visual Studio Tools for Office, the application disables only the add-in that caused the failure. As a result, other add-ins created by using Visual Studio Tools for Office for that Office 2007 application will continue to load.
Soft Disabling
Soft disabling occurs when an add-in throws an unhandled exception in the constructor or the Startup event handler and the Microsoft Office application does not unexpectedly close. The application might disable only the current add-in from loading for the current user. When an application soft disables an add-in, it sets the value of the LoadBehavior registry entry for the add-in to 2. The LoadBehavior entry is located under the following registry key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\<application name>\Addins\<add-in name>. For more information about this registry key, see Registry Entries for Application-Level Add-Ins.