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(ModuleReaderParameters, RuntimeConfiguration?, Version?, DotNetCorePathProvider)
Creates a new .NET Core assembly resolver.
public DotNetCoreAssemblyResolver(ModuleReaderParameters readerParameters, RuntimeConfiguration? configuration, Version? fallbackVersion, DotNetCorePathProvider pathProvider)
Parameters
readerParameters
ModuleReaderParametersThe parameters to use while reading the assembly.
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.
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
ModuleReaderParametersThe parameters to use while reading the assembly.
runtimeVersion
VersionThe 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
IFileServiceThe service to use for reading files from the disk.
configuration
RuntimeConfigurationThe runtime configuration to use.
pathProvider
DotNetCorePathProviderThe 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
IFileServiceThe service to use for reading files from the disk.
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(IFileService, RuntimeConfiguration?, Version?, DotNetCorePathProvider)
Creates a new .NET Core assembly resolver.
public DotNetCoreAssemblyResolver(IFileService fileService, RuntimeConfiguration? configuration, Version? fallbackVersion, DotNetCorePathProvider pathProvider)
Parameters
fileService
IFileServiceThe service to use for reading files from the disk.
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.
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
IFileServiceThe service to use for reading files from the disk.
runtimeVersion
VersionThe 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
VersionThe 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
AssemblyDescriptorThe assembly descriptor to search.
Returns
- string
The path to the assembly, or
null
if none was found.