Tag not monitored by Microsoft.
DTE is a COM object. If you try to reference that COM object on a thread other than the one it was created on then bad things happen. In your specific case it is unclear where this code is being called from but if it isn't on the UI thread of VS then you'll get odd behavior like this. This is a total guess at this point given no other context. It is also dependent upon what type of extension you're building - package, addin, etc.