Skip to content

Commit

Permalink
Fix key-set when trimming to unique references; fixes #20
Browse files Browse the repository at this point in the history
The correct uniqueness key-set is package identifier + version +
resolved assembly path and not just the package itself
  • Loading branch information
atifaziz committed Mar 28, 2017
1 parent 2b9ad39 commit 185713c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace LinqPadless
using Microsoft.CodeAnalysis;
using global::NuGet.Frameworks;
using global::NuGet.Versioning;
using MoreLinq;

#endregion

Expand Down Expand Up @@ -390,8 +391,7 @@ select new

var resolution =
resolutionList
.GroupBy(r => r.package)
.Select(g => g.First())
.DistinctBy(r => (r.package.Id, r.package.Version, r.assemblyPath))
.Select(r => new
{
r.package,
Expand Down

0 comments on commit 185713c

Please sign in to comment.