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) |
It seems that accessing the window’s LinkedWindowFrame.LinkedWindows property causes a corruption when the add-in is docked, which will manifest itself upon attempting to open a file.
I submitted this issue to Connect, including steps to reproduce.
Update: It seems that the issue was fixed! Microsoft will include the fix in the next Visual Studio 2010 update!