Click or drag to resize

CompilationToMetadataReference Method



Creates a metadata reference for this compilation.

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract CompilationReference ToMetadataReference(
	ImmutableArray<string> aliases = null,
	bool embedInteropTypes = false
)

Parameters

aliases (Optional)
Type: ImmutableArrayString
Optional aliases that can be used to refer to the compilation root namespace via extern alias directive.
embedInteropTypes (Optional)
Type: SystemBoolean
Embed the COM types from the reference so that the compiled application no longer requires a primary interop assembly (PIA).

Return Value

Type: CompilationReference
See Also