Hi there,
This is actually (probably) a C# or .NET issue. I'm working on an VS 2005
AddIn and at one point I'm caching all "EnvDTE80.ErrorItem" objects that
result from compiling one or more projects in an arbitrary solution (which
my own code carries out). These objects simply store each warning, error or
other message as seen in the "Error List" window in VS (when you build a
solution). Later on, when I attempt to look at the properties of some (but
not all) of these objects while debuugging, each property is throwing a
"System.Runtime.InteropServices.COMException". It doesn't happen at first
(right after compiling various projects) but only later on after all
compiling is complete. It appears to me (though I'm not certain) that the
properties are being generated on-the-fly and whatever underlying objects
they rely on to retrieve this info are dead by the time I need them. My
question is why? Shouldn't these objects be kept alive as long as my own
collection of "ErrorItem" objects remain alive? Isn't this how things work
in .NET? Thanks in advance..