Solution.AddMetadataReferences メソッド

定義

指定したメタデータ参照を含むようにプロジェクトを更新して、新しいソリューション インスタンスを作成します。

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

パラメーター

projectId
ProjectId
metadataReferences
IEnumerable<MetadataReference>

戻り値

例外

metadataReferences には、null が含まれます。

metadataReferences には重複する項目が含まれています。

プロジェクトには、指定された参照が既に含まれています。

適用対象