I've got a designer that relies on the existence of other solution items. If one of those items is deleted the designer crashes and you have to edit as XML to fix. Not exactly user friendly.
I do, however, have the DTE object representing the instance of Visual Studio, as well as the ProjectItems I am dependent on.
Is it possible to, somewhere in the depths of the DTE, register a listener for the deletion of that ProjectItem? And, if so, How would I do it?
It looks like the culprit here is garbage collection. I found the following two event sets behaved identically.
The key to both was making sure to keep a reference to the events object in the subscriber. Once I added the reference, they behaved like I expected.