Is there any way to run an action when a project with my guidance package enabled is opened?
My guidance package has a tool window that I would like to show whenever a project with my guidance package is opened. I've found events for when a guidance package is enabled/disabled (or was it loaded/unloaded). I could hook up to those, but then I would need to be able to run an action when VS is opened.
In any case, I can imagine that there are other good reasons for functionality like this.
[409 byte] By [
JLeBert] at [2008-1-29]
Is your tool window a VS Tool Window?
If so, you could request for the IRecipeManagerService and then have your toolbox to handle events from it.
Regards,
Oscar Calvo
http://blogs.artinsoft.net/ocalvo
Yes, my tool window is a VS Tool Window. I am converting an existing Visual Studio Package to GAT.
I don't think you understood my problem. Imagine you have a project/solution that has your GAT package enabled in it. Start a new instance of Visual Studio and open your project/solution. As far as I can tell, there is absolutely no place to put code that will get ran automatically. Therefore, there is no place I can put the code to hook up the events.
So the question is, is there any way to run an action when an existing project with my guidance package enable is opened?
Isn't there a way in VS already to have toolwindows opened?
I don't think you'll be able to this from GAT. There's no corresponding developer "recipe" that correlates to the act of opening a toolwindow whenever the solution is opened. I mean, there's no action performed, it's just a setup in the layout of the IDE, which is completely up to the user... dunno.
kzu at 2007-9-9 >

I believe you can register your VS Tool Window to "persist" itself so that the next time you open Visual Studio, it will load your package and show the tool window. The problem is that the Guidance packages that we build aren't actually Visual Studio Packages. I would think it would be wrong to tie my tool window into the actual Guidance Package Package.
I have already written the action to show the tool window and it works fine. The problem is that I need to fake the "persistance" stuff so that I can bring the tool window back up if I need to when a solution is opened with my Guidance Package enabled in it. I believe I have an answer to my question which is that there is no way to have code run whenever the user opens a project/solution that has your Guidance Package enabled in it.
I can live without this but you may want to consider adding this kind of functionality in. My prefered solution would be to be able to specify a recipy to run whenever Visual Studio is opened. I could then hook up to the events for Solutions or Guidance Packages and do whatever I want.
All in all, GAT is very impressive for a pre 1.0 release. The simpler you can make my job the better!