Compartir a través de


Solution.WithProjectReferences Método

Definición

Cree una nueva instancia de solución con el proyecto especificado actualizado para contener la lista especificada de referencias de proyecto.

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

Parámetros

projectId
ProjectId

Identificador del proyecto cuyas referencias se van a reemplazar por projectReferences.

projectReferences
IEnumerable<ProjectReference>

Nuevas referencias de proyecto.

Devoluciones

Excepciones

projectReferences contiene null.

projectReferences contiene elementos duplicados.

La solución no contiene projectId.

Se aplica a