I'm trying to create a little Visual Studio Extension, to do some batch project load and unloading. To do this, I have to select multiple projects at once and then call the Project.ReloadProject
or Project.UnloadProject
command. If I load or unload project after project, it's far too slow.
Here's my sample:
foreach (UIHierarchyItem item in solution.UIHierarchyItems)
{
if (!filter.Projects.Contains(item.Name, StringComparer.CurrentCultureIgnoreCase))
item.Select(vsUISelectionType.vsUISelectionTypeSelect);
}
dte.ExecuteCommand("Project.UnloadProject", "");
The problem is, that I don't know, how to select multiple projects at once. When I'm doing the same task manually, I just hold the ctrl
button and click at the projects.