问题
I developed a VS 2008 add-in and added a custom menu item to context menu for "Project" nodes in Solution Explorer.
This allows me to right-click any project in solution and perform a custom operation on that project. Or at least, it would, if I knew how to access the selected project from my Click event handler.
Can someone with more experience please help me?
回答1:
I think what you're looking for is DTE.ActiveSolutionProjects.
来源:https://stackoverflow.com/questions/1272022/how-to-access-selected-project-in-solution-explorer-from-a-visual-studio-add-in