private static void ExcludeFiles(List <PackageFileBase> searchFiles, string basePath, string exclude) { if (String.IsNullOrEmpty(exclude)) { return; } // One or more exclusions may be specified in the file. Split it and prepend the base path to the wildcard provided. string[] exclusions = exclude.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (string item in exclusions) { string wildCard = PathResolver.NormalizeWildcard(basePath, item); PathResolver.FilterPackageFiles(searchFiles, p => p.OriginalPath, new[] { wildCard }); } }