views:

217

answers:

1

In a Visual Studio plugin, I'm trying to obtain the currently active project.

I've found some Web posts about using DTE.ActiveSolutionProjects. That function gives me objects that can be cast to and array of DTE.Project objects -- but it always gives me the same project, regardless of what I've loaded as the current solution in the IDE. There's always one element in that array, and it's always the same element.

Any other way to find the project?

-- Paul

A: 

It turns out that I ActiveSolutionProjects does what I want -- except that it gives bogus information when running a debugging instance of VS2008. If the plugin is loaded directly into VS2008, I get correct information.