Solution.AddProjectReferences Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Créez une instance de solution avec le projet spécifié mis à jour pour inclure les références de projet spécifiées.
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
Paramètres
- projectId
- ProjectId
- projectReferences
- IEnumerable<ProjectReference>
Retours
Exceptions
projectReferences contient null.
projectReferences contient des éléments en double.
L’ajout de la référence de projet crée une dépendance circulaire.