Bagikan melalui


Solution.AddProjectReferences Metode

Definisi

Buat instans solusi baru dengan proyek yang ditentukan diperbarui untuk menyertakan referensi proyek yang ditentukan.

public:
 Microsoft::CodeAnalysis::Solution ^ AddProjectReferences(Microsoft::CodeAnalysis::ProjectId ^ projectId, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::ProjectReference ^> ^ projectReferences);
public Microsoft.CodeAnalysis.Solution AddProjectReferences(Microsoft.CodeAnalysis.ProjectId projectId, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ProjectReference> projectReferences);
member this.AddProjectReferences : Microsoft.CodeAnalysis.ProjectId * seq<Microsoft.CodeAnalysis.ProjectReference> -> Microsoft.CodeAnalysis.Solution
Public Function AddProjectReferences (projectId As ProjectId, projectReferences As IEnumerable(Of ProjectReference)) As Solution

Parameter

projectId
ProjectId
projectReferences
IEnumerable<ProjectReference>

Mengembalikan

Pengecualian

projectReferences berisi null.

projectReferences berisi item duplikat.

Menambahkan referensi proyek akan membuat dependensi melingkar.

Berlaku untuk