16 references to AddMetadataReferences
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
812
AddMetadataReferences
(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
1345
AddMetadataReferences
(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
4695
AddMetadataReferences
(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40)).
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
85
.
AddMetadataReferences
(projectId, TargetFrameworkUtil.GetReferences(TargetFramework.Mscorlib40))
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
610
.
AddMetadataReferences
(Id, metadataReferencesCreated));
Workspace\Solution\Project.cs (1)
619
=> this.Solution.
AddMetadataReferences
(this.Id, metadataReferences).GetProject(this.Id)!;
Workspace\Solution\Solution.cs (1)
716
return
AddMetadataReferences
(projectId,
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
FindReferencesTests.cs (2)
372
solution = solution.
AddMetadataReferences
(desktopProject.Id, new[] { MscorlibRef_v46, Net46StandardFacade });
419
solution = solution.
AddMetadataReferences
(solution.ProjectIds.Single(), new[] { MscorlibRef_v46, Net46StandardFacade, SystemRef_v46, NetStandard20Ref });
SolutionTests\SolutionTests.cs (7)
1529
var solution2 = solution.
AddMetadataReferences
(projectId, EmptyEnumerable<MetadataReference>());
1535
var solution3 = solution.
AddMetadataReferences
(projectId, OnceEnumerable(metadataRef1, metadataRef2));
1538
Assert.Throws<ArgumentNullException>("projectId", () => solution.
AddMetadataReferences
(null!, new[] { metadataRef1 }));
1539
Assert.Throws<ArgumentNullException>("metadataReferences", () => solution.
AddMetadataReferences
(projectId, null!));
1540
Assert.Throws<ArgumentNullException>("metadataReferences[0]", () => solution.
AddMetadataReferences
(projectId, new MetadataReference[] { null! }));
1541
Assert.Throws<ArgumentException>("metadataReferences[1]", () => solution.
AddMetadataReferences
(projectId, new[] { metadataRef1, metadataRef1 }));
1544
Assert.Throws<InvalidOperationException>(() => solution3.
AddMetadataReferences
(projectId, new[] { metadataRef1 }));