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