Вот как это можно сделать с помощью объекта среды средства разработки
public void RunFinished()
{
Solution2 soln = (Solution2)dte.Solution;
//Close the .Net project overview home page from the output project to be created
foreach (Window documentWindow in dte.Windows)
{
//close all Document type of windows from the output project
if (documentWindow.Kind == "Document")
{
documentWindow.Close();
}
}
}