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
RuntimeConfigurationThe runtime configuration as specified by the *.runtimeconfig.json file.
fallbackVersion
VersionThe version of .NET to fallback on if the runtime configuration is insufficient.
DotNetCoreAssemblyResolver(RuntimeConfiguration?, Version?, DotNetCorePathProvider, ModuleReaderParameters)
Creates a new .NET Core assembly resolver.
public DotNetCoreAssemblyResolver(RuntimeConfiguration? configuration, Version? fallbackVersion, DotNetCorePathProvider pathProvider, ModuleReaderParameters readerParameters)
Parameters
configuration
RuntimeConfigurationThe runtime configuration to use, or
null
if no configuration is available.fallbackVersion
VersionThe version of .NET or .NET Core to use when no (valid) configuration is provided.
pathProvider
DotNetCorePathProviderThe installation directory of .NET Core.
readerParameters
ModuleReaderParametersThe parameters to use while reading the assembly.
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
VersionThe version of .NET to target.
DotNetCoreAssemblyResolver(Version, DotNetCorePathProvider)
Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.
public DotNetCoreAssemblyResolver(Version runtimeVersion, DotNetCorePathProvider pathProvider)
Parameters
runtimeVersion
VersionThe version of .NET to target.
pathProvider
DotNetCorePathProviderThe installation directory of .NET Core.
DotNetCoreAssemblyResolver(Version, ModuleReaderParameters)
Creates a new .NET Core assembly resolver, by attempting to autodetect the current .NET or .NET Core installation directory.
public DotNetCoreAssemblyResolver(Version runtimeVersion, ModuleReaderParameters readerParameters)
Parameters
runtimeVersion
VersionThe version of .NET to target.
readerParameters
ModuleReaderParametersThe parameters to use while reading the assembly.
Methods
ProbeRuntimeDirectories(AssemblyDescriptor)
Probes all known runtime directories for the provided assembly.
protected override string? ProbeRuntimeDirectories(AssemblyDescriptor assembly)
Parameters
assembly
AssemblyDescriptorThe assembly descriptor to search.
Returns
- string
The path to the assembly, or
null
if none was found.