Bewerken

Delen via


PathAssemblyResolver Class

Definition

Represents a metadata assembly resolver that uses paths to every assembly that may be loaded.

public ref class PathAssemblyResolver : System::Reflection::MetadataAssemblyResolver
public class PathAssemblyResolver : System.Reflection.MetadataAssemblyResolver
type PathAssemblyResolver = class
    inherit MetadataAssemblyResolver
Public Class PathAssemblyResolver
Inherits MetadataAssemblyResolver
Inheritance
PathAssemblyResolver

Remarks

The file name is expected to be the same as the assembly's simple name. Multiple assemblies can exist on disk with the same name but in different directories. A single instance of PathAssemblyResolver can be used with multiple MetadataAssemblyResolver instances.

In order for an AssemblyName to match a loaded assembly, AssemblyName.Name must be equal (casing ignored).

  • If a public key token is specified for the AssemblyName, it must be equal.
  • If a public key token is not specified for AssemblyName, assemblies with no public key token are selected over those with a public key token.
  • If more than one assembly matches, the assembly with the highest AssemblyName.Version is returned.
  • AssemblyName.CultureName is ignored.

Constructors

PathAssemblyResolver(IEnumerable<String>)

Initializes a new instance of the PathAssemblyResolver class.

Methods

Resolve(MetadataLoadContext, AssemblyName)

Returns an assembly from a given assembly name.

Applies to