Visual Studio 2010 COM object error

I randomly started getting a, “COM object that has been separated from its underlying RCW cannot be used” error when trying to view a project’s properties in Visual Studio 2010:

This StackOverflow question seems to indicate that it could be caused by one of my add-ins. The first step was to disable add-ins and see if the problem resolves. Go to Tools -> Options. Then Environment -> Add-in / Macros security and uncheck “Allow Add-in components to load.”

I restarted VS and the problem went away. The next step was to start eliminating the add-ins one-by-one to figure out the one causing the trouble. I removed one from the list of Add-in File Paths and restarted VS. Strangely, it didn’t save the change and the add-in directory was still there after the restart. That’s odd.

I finally was able to find where these settings are stored in the registry:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVisualStudio10.0AutomationOptionsLookInFolders

I delete the TestDriven.NET one first since that’s the one causing trouble in the StackOverflow post. I restarted VS and magically the error has gone away. Silly TestDriven.NET.