Compilation.AddReferences Method

Definition

Overloads

AddReferences(MetadataReference[])

Creates a new compilation with additional metadata references.

AddReferences(IEnumerable<MetadataReference>)

Creates a new compilation with additional metadata references.

AddReferences(MetadataReference[])

Creates a new compilation with additional metadata references.

public:
 Microsoft::CodeAnalysis::Compilation ^ AddReferences(... cli::array <Microsoft::CodeAnalysis::MetadataReference ^> ^ references);
public Microsoft.CodeAnalysis.Compilation AddReferences (params Microsoft.CodeAnalysis.MetadataReference[] references);
member this.AddReferences : Microsoft.CodeAnalysis.MetadataReference[] -> Microsoft.CodeAnalysis.Compilation
Public Function AddReferences (ParamArray references As MetadataReference()) As Compilation

Parameters

references
MetadataReference[]

The new references.

Returns

Compilation

A new compilation.

Applies to

AddReferences(IEnumerable<MetadataReference>)

Creates a new compilation with additional metadata references.

public:
 Microsoft::CodeAnalysis::Compilation ^ AddReferences(System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::MetadataReference ^> ^ references);
public Microsoft.CodeAnalysis.Compilation AddReferences (System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.MetadataReference> references);
member this.AddReferences : seq<Microsoft.CodeAnalysis.MetadataReference> -> Microsoft.CodeAnalysis.Compilation
Public Function AddReferences (references As IEnumerable(Of MetadataReference)) As Compilation

Parameters

references
IEnumerable<MetadataReference>

The new references.

Returns

Compilation

A new compilation.

Applies to