public static ProjectImportGroupElement AddNewImportGroup(this ProjectRootElement project, string label = null) { var igroup = project.AddImportGroup(); if(!string.IsNullOrEmpty(label)) igroup.Label = label; return igroup; }
public static ProjectImportGroupElement AddNewImportGroup(this ProjectRootElement project, string configuration, string platform, string label = null) { var igroup = project.AddImportGroup(); var condition = "'$(Configuration)|$(Platform)'=='{0}|{1}'".format(configuration, platform.PlatformNormal()); igroup.Condition = condition; if(!string.IsNullOrEmpty(label)) igroup.Label = label; return igroup; }