VS2010 Extensions - Subscribing to Events
I'm trying to create an extension for VS2010. I've only just started and one of the things I need to do is to keep track of Project Items.
Upon the initialization of the Package I'd like to subscribe to a set of events.
1) Solution Opened
2) Solution Closed 3) Project Loaded 4) Project Unloaded 5) File Added 6) File RemovedMy main problem at the moment is I'm not sure where to start with these Events. I've se开发者_如何学Pythonen the DTE/Solution/Project/ProjectItem interfaces and I've seen techniques to get them, but none of these have events on in this way.
Does anyone know where I need to be looking to find these events? And how to create an instance to subscribe to them?
Found the EnvDTE.SolutionEvents which allows what I needed.
This post talks about creating a new Project
template, but probably gives you some ideas about inheriting from ProjecFactory
and ProjectNode
classes.
Hope helps!
精彩评论