From 689ba591c8754787d9d507f8de45323074e9879b Mon Sep 17 00:00:00 2001 From: Stuart Lang Date: Tue, 18 Sep 2018 19:46:15 +0100 Subject: [PATCH] Ignore the ASP.NET Core meta packages" --- 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));