BUG: Add-in causes Visual Studio 2008 crash when loaded.

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2008 without SP1
Date: April 2009    

When an add-in is loaded in Visual Studio 2008 Team Suite or Visual Studio 2008 Team Edition for Developers, a severe crash can happen in Visual Studio.


This is a bug introduced in Visual Studio 2008 and it happens if the Code Analysis Tools component is not selected when installing the product. In this case, the crash happens when the add-in tries to do some operation with the Visual Studio commandbars, such as:

  • Creating a commandbar
  • Trying to retrieve a commandbar that doesn't exist (it should cause an exception, but not a crash in the IDE)
  • Trying to set the Name property of a CommandBar
  • Others

This problem happens with Visual Studio 2008 editions that include that component, such as the Team Suite edition or the Team Edition for Developers. It doesn't affect other editions such as the Standard or Professional editions that don't offer such component.

The bug can be solved either installing the Code Analysis Tools component, or installing Visual Studio 2008 Service Pack 1.

Go to the 'Visual Studio Extensibility (VSX)' web site for more articles like this (Articles section)