title: Visual Studio 2008 Add-In Check if Hierarchy Item is solution folder
body: <p>I've got a visual studio addin written by developer who is no longer at the company and have no idea how to debug it.  But I want to add a feature so it can recurse into solution folders.  </p>
  
  <p>Sounds simple but I'm not sure the api allows testing for this?
  Well there's got to be a way because AnkhSVN and VisualSVN work fine with Solution Folders.</p>
  
  <p>StackOverflow I'm reaching out for some help on this issue.</p>
  
  <p>Thanks</p>
  
  <p><strong>Notes</strong></p>
  
  <p>-We are using solution folders to hide "Dependency Projects" which are basically a list    of project references that we probably don't care about in the particular solution and want to hide by default.</p>
  
  <pre><code>public class Connect : IDTExtensibility2, IDTCommandTarget
  {
  
  public void GetProjectLocations(DTE2 dte)
  {
  
  UIHierarchy UIH = dte.ToolWindows.SolutionExplorer;
  
  try
  {
       UIHierarchyItem UIHItemd = UIH.UIHierarchyItems.Item(1);
  }
  catch (Exception E)
  {
    Debug.Write(E);
  }
  
  UIHierarchyItem UIHItem = UIH.UIHierarchyItems.Item(1);//this looks suspect to me
  
  // Iterate through first level nodes.
  for (int i = 1; i &lt;= UIHItem.UIHierarchyItems.Count; i++)
  {
    Project TempGeneralProjObj = dte.Solution.Item(i);  
  
    if (TempGeneralProjObj.Kind == PrjKind.prjKindCSharpProject)
    {
    }
  
  }
  
  }
  
  }
  </code></pre>