private void LoadFilesToSkip() { foreach (var fileToSkip in FilesToSkip) { string packageId, packageSubPath; NuGetUtils.GetPackageParts(fileToSkip.ItemSpec, out packageId, out packageSubPath); if (String.IsNullOrEmpty(packageId) || String.IsNullOrEmpty(packageSubPath)) { continue; } var itemType = fileToSkip.GetMetadata(nameof(ConflictResolution.ConflictItemType)); var packagesWithFilesToSkip = (itemType == nameof(ConflictResolution.ConflictItemType.Reference)) ? compileFilesToSkip : runtimeFilesToSkip; HashSet <string> filesToSkipForPackage; if (!packagesWithFilesToSkip.TryGetValue(packageId, out filesToSkipForPackage)) { packagesWithFilesToSkip[packageId] = filesToSkipForPackage = new HashSet <string>(StringComparer.OrdinalIgnoreCase); } filesToSkipForPackage.Add(packageSubPath); } }