Here’s an issue I’ve been struggling with: it seems that by accessing a certain property of a docked tool window of an add-in, an exception is thrown somewhere inside Visual Studio 2010. It’s caught internally, and the exception message, “Object reference is not set to an instance of an object”, is shown whenever I was trying to open any file (code or otherwise).
Here’s the offending code (this OnConnection method belongs to a C# Add-in code, it’s pre-generated when you create a new Add-in for Visual Studio):
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom){ _applicationObject = (DTE2)application;...