提交 e7b7f314 编写于 作者: K Kevin Pilch-Bisson

Merge pull request #1173 from Pilchie/Fix1083

When validating references, ignore duplicates
......@@ -1275,7 +1275,8 @@ private void ValidateReferences()
}
}
var delta = vsproject.References.Count - noReferenceOutputAssemblies.Count - (_projectReferences.Count + _metadataReferences.Count);
var set = new HashSet<string>(vsproject.References.OfType<Reference>().Select(r => PathUtilities.IsAbsolute(r.Name) ? Path.GetFileNameWithoutExtension(r.Name) : r.Name), StringComparer.OrdinalIgnoreCase);
var delta = set.Count - noReferenceOutputAssemblies.Count - (_projectReferences.Count + _metadataReferences.Count);
if (delta == 0)
{
return;
......@@ -1288,8 +1289,6 @@ private void ValidateReferences()
return;
}
var set = new HashSet<string>(vsproject.References.OfType<Reference>().Select(r => PathUtilities.IsAbsolute(r.Name) ? Path.GetFileNameWithoutExtension(r.Name) : r.Name), StringComparer.OrdinalIgnoreCase);
set.ExceptWith(noReferenceOutputAssemblies);
set.ExceptWith(_projectReferences.Select(r => ProjectTracker.GetProject(r.ProjectId).DisplayName));
set.ExceptWith(_metadataReferences.Select(m => Path.GetFileNameWithoutExtension(m.FilePath)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册