public static PackagesInStandardProject Create(string projectFile) { var o = new PackagesInStandardProject(projectFile); o.Parse(); return(o); }
public static IEnumerable <PackageCollection> GetPackageCollectionsUnder(string root) { GenLog.Info($"Looking for NuGet packages used under {root}"); var pkgConfigFiles = Directory.GetFiles(root, "packages.config", SearchOption.AllDirectories) .Where(ShouldProcessDirectoryContaining); foreach (var file in pkgConfigFiles) { yield return(PackagesInConfigFile.Create(file)); } var projects = Directory.GetFiles(root, "*.csproj", SearchOption.AllDirectories) .Where(ShouldProcessProject); foreach (var file in projects) { yield return(PackagesInStandardProject.Create(file)); } }