From e39afd8096f620794c16146233ad7c572b392abd Mon Sep 17 00:00:00 2001 From: Damian Maslanka Date: Wed, 21 Feb 2018 18:47:34 +0100 Subject: [PATCH] (GH-1397) Fix. --- src/chocolatey/infrastructure.app/services/NugetService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/chocolatey/infrastructure.app/services/NugetService.cs b/src/chocolatey/infrastructure.app/services/NugetService.cs index 3a63b6bf09..4f7699f469 100644 --- a/src/chocolatey/infrastructure.app/services/NugetService.cs +++ b/src/chocolatey/infrastructure.app/services/NugetService.cs @@ -899,8 +899,7 @@ public ConcurrentDictionary get_outdated(ChocolateyConfig .AsQueryable(); } - // Call .ToList() to prevent warning from NuGet if package is not found in a remote repository - var latestPackage = results.OrderByDescending(x => x.Version).ToList().FirstOrDefault(); + var latestPackage = results.ToList().OrderByDescending(x => x.Version).FirstOrDefault(); if (latestPackage == null) {