parent
fc9097459e
commit
43d57e438e
1 changed files with 7 additions and 13 deletions
|
@ -60,7 +60,9 @@ namespace Microsoft.DotNet.ProjectModel.Graph
|
||||||
// If the framework name is empty, the associated dependencies are shared by all frameworks
|
// If the framework name is empty, the associated dependencies are shared by all frameworks
|
||||||
if (group.FrameworkName == null)
|
if (group.FrameworkName == null)
|
||||||
{
|
{
|
||||||
actualDependencies = project.Dependencies.Select(RenderDependency).OrderBy(x => x);
|
actualDependencies = project.Dependencies
|
||||||
|
.Select(RenderDependency)
|
||||||
|
.OrderBy(x => x, StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -71,7 +73,9 @@ namespace Microsoft.DotNet.ProjectModel.Graph
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
actualDependencies = framework.Dependencies.Select(RenderDependency).OrderBy(x => x);
|
actualDependencies = framework.Dependencies
|
||||||
|
.Select(RenderDependency)
|
||||||
|
.OrderBy(x => x, StringComparer.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!actualDependencies.SequenceEqual(expectedDependencies))
|
if (!actualDependencies.SequenceEqual(expectedDependencies))
|
||||||
|
@ -84,16 +88,6 @@ namespace Microsoft.DotNet.ProjectModel.Graph
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string RenderDependency(LibraryRange arg)
|
private string RenderDependency(LibraryRange arg) => $"{arg.Name} {VersionUtility.RenderVersion(arg.VersionRange)}";
|
||||||
{
|
|
||||||
var name = arg.Name;
|
|
||||||
|
|
||||||
if (arg.Target == LibraryType.ReferenceAssembly)
|
|
||||||
{
|
|
||||||
name = $"fx/{name}";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{name} {VersionUtility.RenderVersion(arg.VersionRange)}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue