未验证 提交 92afb5eb 编写于 作者: B Brett V. Forsgren 提交者: GitHub

Merge pull request #26499 from dotnet/merges/dev15.7.x-to-dev15.7.x-vs-deps

Merge dev15.7.x to dev15.7.x-vs-deps
......@@ -624,6 +624,13 @@ private void AddMetadataReferenceCore(VisualStudioMetadataReference reference)
{
lock (_gate)
{
if (_metadataReferences.Contains(r => StringComparer.OrdinalIgnoreCase.Equals(r.FilePath, reference.FilePath)))
{
// TODO: Added in order to diagnose why duplicate references get added to the project. See https://github.com/dotnet/roslyn/issues/26437
FatalError.ReportWithoutCrash(new InvalidOperationException($"Reference with path '{reference.FilePath}' already exists in project '{DisplayName}'."));
return;
}
_metadataReferences.Add(reference);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册