From f36b283bbd0809951c4f8cf45b6901daa7a2fb55 Mon Sep 17 00:00:00 2001 From: Stuart Lang Date: Mon, 24 Sep 2018 20:18:31 +0100 Subject: [PATCH] Ignore the ASP.NET Core meta packages" (#436) --- NuKeeper.Inspection/UpdateFinder.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NuKeeper.Inspection/UpdateFinder.cs b/NuKeeper.Inspection/UpdateFinder.cs index c8912b03e..66cc61a18 100644 --- a/NuKeeper.Inspection/UpdateFinder.cs +++ b/NuKeeper.Inspection/UpdateFinder.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -15,6 +16,13 @@ public class UpdateFinder: IUpdateFinder private readonly IPackageUpdatesLookup _packageUpdatesLookup; private readonly INuKeeperLogger _logger; + // ASP.NET Core has well know packages that should either be implicitly versioned, or carefully selected based on installed runtime + private static readonly List KnownIgnoredPackages = new List + { + "Microsoft.AspNetCore.App", + "Microsoft.AspNetCore.All" + }; + public UpdateFinder( IRepositoryScanner repositoryScanner, IPackageUpdatesLookup packageUpdatesLookup, @@ -32,6 +40,7 @@ public async Task> FindPackageUpdateSets( { // scan for nuget packages var packages = _repositoryScanner.FindAllNuGetPackages(workingFolder) + .Where(x => !KnownIgnoredPackages.Contains(x.Id, StringComparer.OrdinalIgnoreCase)) .ToList(); _logger.Log(PackagesFoundLogger.Log(packages));