After NuGet started lower casing the packages, we started hitting issues where we failed to locate dependencies under our list of libraries due to different casing in the libraries names. The fix here is to compare the library names ignoring casing.
This commit is contained in:
parent
ad66b8935c
commit
b05b0e6dc5
13 changed files with 32 additions and 19 deletions
|
@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Tools.Build
|
|||
foreach (var context in contexts)
|
||||
{
|
||||
var libraries = context.LibraryManager.GetLibraries();
|
||||
var lookup = libraries.ToDictionary(l => l.Identity.Name);
|
||||
var lookup = libraries.ToDictionary(l => l.Identity.Name, StringComparer.OrdinalIgnoreCase);
|
||||
var root = lookup[context.ProjectFile.Name];
|
||||
yield return TraverseProject((ProjectDescription) root, lookup, context);
|
||||
}
|
||||
|
|
|
@ -96,10 +96,13 @@ namespace Microsoft.DotNet.Tools.Compiler
|
|||
public static List<CultureResgenIO> GetCultureResources(Project project, string outputPath)
|
||||
{
|
||||
return
|
||||
(from resourceFileGroup in project.Files.ResourceFiles.GroupBy(resourceFile => ResourceUtility.GetResourceCultureName(resourceFile.Key))
|
||||
(from resourceFileGroup in project.Files.ResourceFiles.GroupBy(
|
||||
resourceFile => ResourceUtility.GetResourceCultureName(resourceFile.Key))
|
||||
let culture = resourceFileGroup.Key
|
||||
where !string.IsNullOrEmpty(culture)
|
||||
let inputFileToMetadata = resourceFileGroup.ToDictionary(r => r.Key, r => GetResourceFileMetadataName(project, r.Key, r.Value))
|
||||
let inputFileToMetadata = resourceFileGroup.ToDictionary(
|
||||
r => r.Key,
|
||||
r => GetResourceFileMetadataName(project, r.Key, r.Value))
|
||||
let resourceOutputPath = Path.Combine(outputPath, culture)
|
||||
let outputFile = Path.Combine(resourceOutputPath, project.Name + ".resources.dll")
|
||||
select new CultureResgenIO(culture, inputFileToMetadata, outputFile)
|
||||
|
|
|
@ -126,7 +126,9 @@ namespace Microsoft.DotNet.Tools.Compiler
|
|||
if (compilationOptions.PreserveCompilationContext == true)
|
||||
{
|
||||
var allExports = exporter.GetAllExports().ToList();
|
||||
var exportsLookup = allExports.ToDictionary(e => e.Library.Identity.Name);
|
||||
var exportsLookup = allExports.ToDictionary(
|
||||
e => e.Library.Identity.Name,
|
||||
StringComparer.OrdinalIgnoreCase);
|
||||
var buildExclusionList = context.GetTypeBuildExclusionList(exportsLookup);
|
||||
var filteredExports = allExports
|
||||
.Where(e => e.Library.Identity.Type.Equals(LibraryType.ReferenceAssembly) ||
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
|
||||
var exports = exporter.GetAllExports();
|
||||
|
||||
var exportsLookup = exports.ToDictionary(e => e.Library.Identity.Name);
|
||||
var exportsLookup = exports.ToDictionary(e => e.Library.Identity.Name, StringComparer.OrdinalIgnoreCase);
|
||||
var platformExclusionList = context.GetPlatformExclusionList(exportsLookup);
|
||||
var buildExclusionList = context.GetTypeBuildExclusionList(exportsLookup);
|
||||
var allExclusionList = new HashSet<string>(platformExclusionList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue