Condividi tramite


Solution.WithProjectMetadataReferences Metodo

Definizione

Creare una nuova istanza della soluzione con il progetto specificato aggiornata per includere solo i riferimenti ai metadati specificati.

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

Parametri

projectId
ProjectId
metadataReferences
IEnumerable<MetadataReference>

Restituisce

Eccezioni

metadataReferences contiene null.

metadataReferences contiene elementi duplicati.

La soluzione non contiene projectId.

Si applica a