Table of Contents

Class DotNetCoreAssemblyResolver

Namespace
AsmResolver.DotNet
Assembly
AsmResolver.DotNet.dll

Provides an implementation of an assembly resolver that includes .NET or .NET Core runtime libraries.

public class DotNetCoreAssemblyResolver : AssemblyResolverBase, IAssemblyResolver
Inheritance
DotNetCoreAssemblyResolver
Implements
Inherited Members

Constructors

DotNetCoreAssemblyResolver(RuntimeConfiguration?, Version)

Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.

public DotNetCoreAssemblyResolver(RuntimeConfiguration? configuration, Version fallbackVersion)

Parameters

configuration RuntimeConfiguration

The runtime configuration as specified by the *.runtimeconfig.json file.

fallbackVersion Version

The version of .NET to fallback on if the runtime configuration is insufficient.

DotNetCoreAssemblyResolver(ModuleReaderParameters, RuntimeConfiguration?, Version?, DotNetCorePathProvider)

Creates a new .NET Core assembly resolver.

public DotNetCoreAssemblyResolver(ModuleReaderParameters readerParameters, RuntimeConfiguration? configuration, Version? fallbackVersion, DotNetCorePathProvider pathProvider)

Parameters

readerParameters ModuleReaderParameters

The parameters to use while reading the assembly.

configuration RuntimeConfiguration

The runtime configuration to use, or null if no configuration is available.

fallbackVersion Version

The version of .NET or .NET Core to use when no (valid) configuration is provided.

pathProvider DotNetCorePathProvider

The installation directory of .NET Core.

DotNetCoreAssemblyResolver(ModuleReaderParameters, Version)

Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.

public DotNetCoreAssemblyResolver(ModuleReaderParameters readerParameters, Version runtimeVersion)

Parameters

readerParameters ModuleReaderParameters

The parameters to use while reading the assembly.

runtimeVersion Version

The version of .NET to target.

DotNetCoreAssemblyResolver(IFileService, RuntimeConfiguration?, DotNetCorePathProvider)

Creates a new .NET Core assembly resolver.

public DotNetCoreAssemblyResolver(IFileService fileService, RuntimeConfiguration? configuration, DotNetCorePathProvider pathProvider)

Parameters

fileService IFileService

The service to use for reading files from the disk.

configuration RuntimeConfiguration

The runtime configuration to use.

pathProvider DotNetCorePathProvider

The installation directory of .NET Core.

DotNetCoreAssemblyResolver(IFileService, RuntimeConfiguration?, Version)

Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.

public DotNetCoreAssemblyResolver(IFileService fileService, RuntimeConfiguration? configuration, Version fallbackVersion)

Parameters

fileService IFileService

The service to use for reading files from the disk.

configuration RuntimeConfiguration

The runtime configuration as specified by the *.runtimeconfig.json file.

fallbackVersion Version

The version of .NET to fallback on if the runtime configuration is insufficient.

DotNetCoreAssemblyResolver(IFileService, RuntimeConfiguration?, Version?, DotNetCorePathProvider)

Creates a new .NET Core assembly resolver.

public DotNetCoreAssemblyResolver(IFileService fileService, RuntimeConfiguration? configuration, Version? fallbackVersion, DotNetCorePathProvider pathProvider)

Parameters

fileService IFileService

The service to use for reading files from the disk.

configuration RuntimeConfiguration

The runtime configuration to use, or null if no configuration is available.

fallbackVersion Version

The version of .NET or .NET Core to use when no (valid) configuration is provided.

pathProvider DotNetCorePathProvider

The installation directory of .NET Core.

DotNetCoreAssemblyResolver(IFileService, Version)

Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.

public DotNetCoreAssemblyResolver(IFileService fileService, Version runtimeVersion)

Parameters

fileService IFileService

The service to use for reading files from the disk.

runtimeVersion Version

The version of .NET to target.

DotNetCoreAssemblyResolver(Version)

Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.

public DotNetCoreAssemblyResolver(Version runtimeVersion)

Parameters

runtimeVersion Version

The version of .NET to target.

Methods

ProbeRuntimeDirectories(AssemblyDescriptor)

Probes all known runtime directories for the provided assembly.

protected override string? ProbeRuntimeDirectories(AssemblyDescriptor assembly)

Parameters

assembly AssemblyDescriptor

The assembly descriptor to search.

Returns

string

The path to the assembly, or null if none was found.