void Prune(MSBuildPropertyGroup g) { if (g != groups[0] && !g.Properties.Any()) { // Remove this group since it's now empty g.Parent.RemoveGroup(g); } } }