diff --git a/NuKeeper.Abstractions/RepositoryInspection/PackageUpdateSet.cs b/NuKeeper.Abstractions/RepositoryInspection/PackageUpdateSet.cs index 29fff5268..6e6514209 100644 --- a/NuKeeper.Abstractions/RepositoryInspection/PackageUpdateSet.cs +++ b/NuKeeper.Abstractions/RepositoryInspection/PackageUpdateSet.cs @@ -59,12 +59,12 @@ public int CountCurrentVersions() private void CheckIdConsistency() { - if (CurrentPackages.Any(p => p.Id != SelectedId)) + if (CurrentPackages.Any(p => !p.Id.Equals(SelectedId,StringComparison.InvariantCultureIgnoreCase))) { var errorIds = CurrentPackages .Select(p => p.Id) .Distinct() - .Where(id => id != SelectedId); + .Where(id => !id.Equals(SelectedId,StringComparison.InvariantCultureIgnoreCase)); throw new ArgumentException($"Updates must all be for package '{SelectedId}', got '{errorIds.JoinWithCommas()}'"); } diff --git a/NuKeeper.Inspection/NuGetApi/PackageUpdatesLookup.cs b/NuKeeper.Inspection/NuGetApi/PackageUpdatesLookup.cs index c0e737b0c..9f0aae060 100644 --- a/NuKeeper.Inspection/NuGetApi/PackageUpdatesLookup.cs +++ b/NuKeeper.Inspection/NuGetApi/PackageUpdatesLookup.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -37,7 +38,7 @@ public PackageUpdatesLookup(IBulkPackageLookup bulkPackageLookup) var matchVersion = latestPackage.Selected().Identity.Version; var updatesForThisPackage = packages - .Where(p => p.Id == packageId && p.Version < matchVersion) + .Where(p => p.Id.Equals(packageId,StringComparison.InvariantCultureIgnoreCase) && p.Version < matchVersion) .ToList(); if (updatesForThisPackage.Count > 0) diff --git a/NuKeeper.Update/Process/UpdateDirectoryBuildTargetsCommand.cs b/NuKeeper.Update/Process/UpdateDirectoryBuildTargetsCommand.cs index f594377df..6ac0f3fd1 100644 --- a/NuKeeper.Update/Process/UpdateDirectoryBuildTargetsCommand.cs +++ b/NuKeeper.Update/Process/UpdateDirectoryBuildTargetsCommand.cs @@ -1,3 +1,4 @@ +using System; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -47,8 +48,8 @@ public UpdateDirectoryBuildTargetsCommand(INuKeeperLogger logger) var packageNodeList = packagesNode.Elements("PackageReference") .Where(x => - (x.Attributes("Include").Any(a => a.Value == currentPackage.Id) - || x.Attributes("Update").Any(a => a.Value == currentPackage.Id))); + (x.Attributes("Include").Any(a => a.Value.Equals(currentPackage.Id, StringComparison.InvariantCultureIgnoreCase)) + || x.Attributes("Update").Any(a => a.Value.Equals(currentPackage.Id,StringComparison.InvariantCultureIgnoreCase)))); foreach (var dependencyToUpdate in packageNodeList) {