Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MetadataReference Class

Definition

Namespace:
Microsoft.CodeAnalysis
Assembly:
Microsoft.CodeAnalysis.dll
Package:
Microsoft.CodeAnalysis.Common v3.0.0
Package:
Microsoft.CodeAnalysis.Common v3.1.0
Package:
Microsoft.CodeAnalysis.Common v3.10.0
Package:
Microsoft.CodeAnalysis.Common v3.11.0
Package:
Microsoft.CodeAnalysis.Common v3.2.0
Package:
Microsoft.CodeAnalysis.Common v3.2.1
Package:
Microsoft.CodeAnalysis.Common v3.3.1
Package:
Microsoft.CodeAnalysis.Common v3.4.0
Package:
Microsoft.CodeAnalysis.Common v3.5.0
Package:
Microsoft.CodeAnalysis.Common v3.6.0
Package:
Microsoft.CodeAnalysis.Common v3.7.0
Package:
Microsoft.CodeAnalysis.Common v3.8.0
Package:
Microsoft.CodeAnalysis.Common v3.9.0
Package:
Microsoft.CodeAnalysis.Common v4.0.1
Package:
Microsoft.CodeAnalysis.Common v4.1.0
Package:
Microsoft.CodeAnalysis.Common v4.12.0
Package:
Microsoft.CodeAnalysis.Common v4.13.0
Package:
Microsoft.CodeAnalysis.Common v4.14.0
Package:
Microsoft.CodeAnalysis.Common v4.2.0
Package:
Microsoft.CodeAnalysis.Common v4.3.1
Package:
Microsoft.CodeAnalysis.Common v4.4.0
Package:
Microsoft.CodeAnalysis.Common v4.5.0
Package:
Microsoft.CodeAnalysis.Common v4.6.0
Package:
Microsoft.CodeAnalysis.Common v4.7.0
Package:
Microsoft.CodeAnalysis.Common v4.8.0
Package:
Microsoft.CodeAnalysis.Common v4.9.2
Package:
Microsoft.CodeAnalysis.Common v5.0.0
Package:
Microsoft.CodeAnalysis.Common v5.3.0
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs
Source:
MetadataReference.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents metadata image reference.

public ref class MetadataReference abstract
public abstract class MetadataReference
type MetadataReference = class
Public MustInherit Class MetadataReference
Inheritance
MetadataReference
Derived

Remarks

Represents a logical location of the image, not the content of the image. The content might change in time. A snapshot is taken when the compiler queries the reference for its metadata.

Constructors

Name Description
MetadataReference(MetadataReferenceProperties)

Properties

Name Description
Display

Path or name used in error messages to identity the reference.

Properties

Methods

Name Description
CreateFromAssembly(Assembly, MetadataReferenceProperties, DocumentationProvider)
Obsolete.

Creates a reference to a loaded assembly.

CreateFromAssembly(Assembly)
Obsolete.

Creates a reference to a loaded assembly.

CreateFromFile(String, MetadataReferenceProperties, DocumentationProvider)

Creates a reference to an assembly or standalone module stored in a file. Reads the content of the file into memory.

CreateFromImage(IEnumerable<Byte>, MetadataReferenceProperties, DocumentationProvider, String)

Creates a reference to a single-module assembly or a standalone module stored in memory.

CreateFromImage(ImmutableArray<Byte>, MetadataReferenceProperties, DocumentationProvider, String)

Creates a reference to a single-module assembly or a standalone module stored in memory.

CreateFromStream(Stream, MetadataReferenceProperties, DocumentationProvider, String)

Creates a reference to a single-module assembly or a stand-alone module from data in specified stream. Reads the content of the stream into memory and closes the stream upon return.

WithAliases(IEnumerable<String>)

Returns an instance of the reference with specified aliases.

WithAliases(ImmutableArray<String>)

Returns an instance of the reference with specified aliases.

WithEmbedInteropTypes(Boolean)

Returns an instance of the reference with specified interop types embedding.

WithProperties(MetadataReferenceProperties)

Returns an instance of the reference with specified properties, or this instance if properties haven't changed.

Applies to


Feedback

Was this page helpful?