Bagikan melalui


Solution.WithProjectReferences Metode

Definisi

Buat instans solusi baru dengan proyek yang ditentukan diperbarui agar berisi daftar referensi proyek yang ditentukan.

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

Parameter

projectId
ProjectId

Id proyek yang referensinya akan diganti dengan projectReferences.

projectReferences
IEnumerable<ProjectReference>

Referensi proyek baru.

Mengembalikan

Pengecualian

projectReferences berisi null.

projectReferences berisi item duplikat.

Solusinya tidak berisi projectId.

Berlaku untuk