public static int NumberOfProjectReferencesWithIncludeContaining( this ProjectRootElement root, string includePattern) { return(root.ItemsWithIncludeContaining("ProjectReference", includePattern).Count()); }