Condividi tramite


Solution.WithProjectReferences Metodo

Definizione

Creare una nuova istanza della soluzione con il progetto specificato aggiornato per contenere l'elenco specificato di riferimenti al progetto.

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

Parametri

projectId
ProjectId

ID del progetto i cui riferimenti da sostituire con projectReferences.

projectReferences
IEnumerable<ProjectReference>

Nuovi riferimenti al progetto.

Restituisce

Eccezioni

projectReferences contiene null.

projectReferences contiene elementi duplicati.

La soluzione non contiene projectId.

Si applica a