Beispiel #1
0
 private IEnumerable <MissingPackageDependency> GetMissingPackages(FrameworkName targetFramework)
 {
     // All dependencies of all packages ...
     return(Packages.SelectMany(p => p.GetCompatiblePackageDependencies(targetFramework),
                                (package, dependency) => new { package, dependency })
            // ... that aren't installed as a package ...
            .Where(d => !Packages.Select(p => p.Id).Contains(d.dependency.Id))
            // ... or as a project
            .Where(d => !MsBuildProject.GetProjectReferenceNames().Contains(d.dependency.Id))
            // Dependencies don't have good equality checking
            .GroupBy(d => d.dependency.ToString())
            .Select(g => new MissingPackageDependency(g.First().dependency, g.Select(d => d.package))));
 }