AssemblyAnalyzer
Namespace: Dotsider.Core.Analysis
Assembly: Dotsider.Core.dll
Core analyzer that reads .NET assemblies, Webcil app assemblies, native binaries, and raw Wasm modules. It uses BCL metadata/PE readers where possible and routes runtime-native formats through dotsider’s format readers for IL, strings, symbols, disassembly, and size data.
public sealed class AssemblyAnalyzer : IDisposableInheritance
Section titled “Inheritance”Object → AssemblyAnalyzer
Implements
Section titled “Implements”Constructors
Section titled “Constructors”AssemblyAnalyzer(byte[], string, string?, string?, string?, string?)
Section titled “AssemblyAnalyzer(byte[], string, string?, string?, string?, string?)”Creates an analyzer from raw module bytes with resolution context inherited from its manifest assembly.
Parameters:
bytes(Byte[]): The raw module bytes.filePath(String): The authenticated sibling-module path.sourceBundlePath(String): The source bundle path, or null.displayName(String): The logical name of the analyzed module.targetFrameworkOverride(String): The manifest’s target-framework context.preferredRuntimePackOverride(String): The manifest’s preferred runtime pack.
Exceptions:
- BadImageFormatException: bytes contains a recognized managed PE or Webcil image that is malformed.
public AssemblyAnalyzer(byte[] bytes, string filePath, string? sourceBundlePath, string? displayName, string? targetFrameworkOverride, string? preferredRuntimePackOverride)AssemblyAnalyzer(byte[], string, string?, string?)
Section titled “AssemblyAnalyzer(byte[], string, string?, string?)”Creates an analyzer from raw bytes in memory. Used for bundle-extracted assemblies and as a last-resort fallback when disk I/O is unavailable after a save operation.
Parameters:
bytes(Byte[]): The raw assembly bytes.filePath(String): On-disk path for physical operations (tracing, save checks).sourceBundlePath(String): If this assembly was extracted from a single-file bundle, the path to the bundle file. Used for assembly resolution context.displayName(String): Logical name of the analyzed artifact for UI display (e.g. “SelfContainedConsole.dll” when the entry assembly is extracted from a bundle). If null, defaults to the file name portion of filePath.
Exceptions:
- BadImageFormatException: bytes contains a recognized managed PE or Webcil image that is malformed.
public AssemblyAnalyzer(byte[] bytes, string filePath, string? sourceBundlePath = null, string? displayName = null)AssemblyAnalyzer(string)
Section titled “AssemblyAnalyzer(string)”Opens and analyzes the specified .NET assembly file.
Parameters:
filePath(String): Absolute path to the assembly file.
Exceptions:
- FileNotFoundException: The file does not exist.
- BadImageFormatException: The file contains a recognized managed PE or Webcil image that is malformed.
public AssemblyAnalyzer(string filePath)Properties
Section titled “Properties”Architecture
Section titled “Architecture”The PE architecture description (e.g., “AnyCPU”, “x64”, “ARM64”).
Returns: String
public string Architecture { get; }AssemblyName
Section titled “AssemblyName”The assembly simple name, or null if the file has no assembly manifest.
Returns: String
public string? AssemblyName { get; }AssemblyRefs
Section titled “AssemblyRefs”Gets the AssemblyRef metadata table entries.
Returns: IReadOnlyList<AssemblyRefInfo>
public IReadOnlyList<AssemblyRefInfo> AssemblyRefs { get; }AssemblyVersion
Section titled “AssemblyVersion”The assembly version string, or null.
Returns: String
public string? AssemblyVersion { get; }BinaryKind
Section titled “BinaryKind”Coarse classification of the analyzed binary.
Returns: BinaryKind
public BinaryKind BinaryKind { get; }CanSaveInPlace
Section titled “CanSaveInPlace”Whether in-place hex save is supported. Returns false for bundle-backed analyzers
because writing extracted entry bytes back over the bundle would corrupt it.
Returns: Boolean
public bool CanSaveInPlace { get; }ClrHeader
Section titled “ClrHeader”The parsed CLR header, or null if not a .NET assembly.
Returns: ClrHeader
public ClrHeader? ClrHeader { get; }CreatedTime
Section titled “CreatedTime”The creation time in UTC.
Returns: DateTime
public DateTime CreatedTime { get; }Culture
Section titled “Culture”The assembly culture, or null for culture-neutral assemblies.
Returns: String
public string? Culture { get; }CustomAttributes
Section titled “CustomAttributes”Gets the custom attributes applied to metadata entities.
Returns: IReadOnlyList<CustomAttributeInfo>
public IReadOnlyList<CustomAttributeInfo> CustomAttributes { get; }DebugDirectory
Section titled “DebugDirectory”Gets the PE debug directory entries.
Returns: IReadOnlyList<DebugDirectoryInfo>
public IReadOnlyList<DebugDirectoryInfo> DebugDirectory { get; }The ILC dependency graph found next to a Native AOT binary, or null when this is not a Native AOT binary or no readable DGML sidecar sits beside it. Graphs run to hundreds of thousands of links, so touch this only when a dependency question is actually being asked. The value is assigned before the probed flag, so a rare concurrent first read costs at most a second parse of immutable data.
Returns: DgmlGraph
public DgmlGraph? Dgml { get; }DgmlPath
Section titled “DgmlPath”The path of the DGML sidecar next to a Native AOT binary — the codegen graph when present (its node names match the mstat’s exactly), else the scan graph — or null when this is not a Native AOT binary or neither file is present.
Returns: String
public string? DgmlPath { get; }DisplayName
Section titled “DisplayName”Logical display name for the analyzed artifact. For bundle-backed analyzers this is the entry assembly file name (e.g. “SelfContainedConsole.dll”) while FilePath points to the bundle executable on disk. For file-backed analyzers, equals FileName.
Returns: String
public string DisplayName { get; }Exports
Section titled “Exports”Gets the native export table: PE exports, or the defined global symbols of an ELF or Mach-O image. Needs no CLR header; empty when the image exports nothing.
Returns: IReadOnlyList<ExportedFunctionInfo>
public IReadOnlyList<ExportedFunctionInfo> Exports { get; }FieldDefs
Section titled “FieldDefs”Gets the FieldDef metadata table entries.
Returns: IReadOnlyList<FieldDefInfo>
public IReadOnlyList<FieldDefInfo> FieldDefs { get; }FileName
Section titled “FileName”The file name without directory path.
Returns: String
public string FileName { get; }FilePath
Section titled “FilePath”The full path to the analyzed assembly file.
Returns: String
public string FilePath { get; }FileSize
Section titled “FileSize”The file size in bytes.
Returns: Int64
public long FileSize { get; }FrozenStrings
Section titled “FrozenStrings”Frozen String literals recovered from a Native AOT binary’s frozen object region — the AOT counterpart of the #US heap. Empty when this is not a Native AOT binary, or on Linux where the region is filled at startup and has no file backing (the raw UTF-16 scan surfaces that text instead).
Returns: IReadOnlyList<StringEntry>
public IReadOnlyList<StringEntry> FrozenStrings { get; }HasEmbeddedNativeCode
Section titled “HasEmbeddedNativeCode”Whether this image has precompiled native method bodies mapped to managed methods.
Returns: Boolean
public bool HasEmbeddedNativeCode { get; }HasManagedMetadata
Section titled “HasManagedMetadata”Whether this image carries ECMA-335 metadata (managed or ReadyToRun).
Returns: Boolean
public bool HasManagedMetadata { get; }HasMetadata
Section titled “HasMetadata”Whether the PE file contains .NET metadata.
Returns: Boolean
public bool HasMetadata { get; }HasPortablePdb
Section titled “HasPortablePdb”Gets whether a portable PDB was opened.
Returns: Boolean
public bool HasPortablePdb { get; }Imports
Section titled “Imports”Gets the native import table: PE import descriptors, ELF needed libraries and
undefined dynamic symbols, or Mach-O loaded dylibs and undefined symbols.
ELF symbols whose GNU version requirements are absent or malformed are grouped
under (unversioned) rather than attributed to untrusted metadata.
Needs no CLR header.
Returns: IReadOnlyList<ImportedModuleInfo>
public IReadOnlyList<ImportedModuleInfo> Imports { get; }IsBundleBacked
Section titled “IsBundleBacked”Whether this analyzer was created from bytes extracted from a single-file bundle.
Returns: Boolean
public bool IsBundleBacked { get; }IsReadOnly
Section titled “IsReadOnly”Whether the file is read-only on disk.
Returns: Boolean
public bool IsReadOnly { get; }IsReadyToRun
Section titled “IsReadyToRun”Whether this is a crossgen2 ReadyToRun image.
Returns: Boolean
public bool IsReadyToRun { get; }LastModified
Section titled “LastModified”The last modification time in UTC.
Returns: DateTime
public DateTime LastModified { get; }LaunchPath
Section titled “LaunchPath”The path to launch when tracing this assembly. For bundle-backed analyzers this is the bundle executable; for file-backed analyzers this is FilePath.
Returns: String
public string LaunchPath { get; }LoadConfig
Section titled “LoadConfig”Gets the parsed load configuration directory, or null when absent or not a PE.
Returns: LoadConfigInfo
public LoadConfigInfo? LoadConfig { get; }ManagedNativeIndex
Section titled “ManagedNativeIndex”The managed↔native correlation index over the attached companion set, built lazily on first access; null before AttachPreIlcCompanions. A build that races a detach or dispose abandons its result: it captures the generation up front, materializes inputs under an ObjectDisposedException guard, and publishes only when the generation is unchanged.
Returns: ManagedNativeIndex
public ManagedNativeIndex? ManagedNativeIndex { get; }MemberRefs
Section titled “MemberRefs”Gets the MemberRef metadata table entries.
Returns: IReadOnlyList<MemberRefInfo>
public IReadOnlyList<MemberRefInfo> MemberRefs { get; }MethodDefs
Section titled “MethodDefs”Gets the MethodDef metadata table entries.
Returns: IReadOnlyList<MethodDefInfo>
public IReadOnlyList<MethodDefInfo> MethodDefs { get; }The ILC size report found next to a Native AOT binary, or null when this is not a
Native AOT binary or no readable .mstat sidecar sits beside it. The value is
assigned before the probed flag, so a rare concurrent first read costs at most a
second parse of immutable data.
Returns: MstatData
public MstatData? Mstat { get; }MstatPath
Section titled “MstatPath”The path of the .mstat sidecar next to a Native AOT binary, or null when this
is not a Native AOT binary or the file is absent.
Returns: String
public string? MstatPath { get; }NativeAotInfo
Section titled “NativeAotInfo”Facts from the embedded ReadyToRun header when this is a Native AOT binary, or null. Only probed for metadata-less files — a managed ReadyToRun assembly also embeds the header, but there it accompanies metadata rather than replacing it.
Returns: NativeAotInfo
public NativeAotInfo? NativeAotInfo { get; }NativeSymbols
Section titled “NativeSymbols”The native symbols of this binary — function names, addresses, and sizes read from its PDB, DWARF, or dSYM, or function boundaries from unwind data when no symbols exist. Null for managed assemblies. Parsed on demand; the value is assigned before the probed flag, so a rare concurrent first read costs at most a second parse of immutable data.
Returns: NativeSymbolInfo
public NativeSymbolInfo? NativeSymbols { get; }NativeSymbolsPath
Section titled “NativeSymbolsPath”The symbol file the native symbols were read from (PDB, .dbg, or dSYM), or null.
Returns: String
public string? NativeSymbolsPath { get; }PdbProvenance
Section titled “PdbProvenance”Portable PDB provenance for the analyzed assembly.
Returns: PdbProvenance
public PdbProvenance PdbProvenance { get; }PeHeaders
Section titled “PeHeaders”The parsed PE headers.
Returns: PeHeaders
public PeHeaders? PeHeaders { get; }PreferredRuntimePack
Section titled “PreferredRuntimePack”The preferred .NET runtime pack for this assembly, detected from its assembly references. Returns “Microsoft.WindowsDesktop.App” for WPF/WinForms assemblies, “Microsoft.AspNetCore.App” for ASP.NET Core assemblies, or “Microsoft.NETCore.App” otherwise.
Returns: String
public string PreferredRuntimePack { get; }PreIlcCompanions
Section titled “PreIlcCompanions”The attached pre-ILC companion set, or null before AttachPreIlcCompanions succeeds. Owned by this analyzer — see PreIlcCompanionSet for the ownership contract.
Returns: PreIlcCompanionSet
public PreIlcCompanionSet? PreIlcCompanions { get; }PreIlcSidecars
Section titled “PreIlcSidecars”The pre-ILC build outputs probed for a Native AOT binary — its managed input, portable PDB, and intermediate-tree mstat/DGML sidecars — or null when this is not a Native AOT binary or nothing was found. The value is assigned before the probed flag, so a rare concurrent first read costs at most a second probe.
Returns: PreIlcSidecars
public PreIlcSidecars? PreIlcSidecars { get; }PublicKeyToken
Section titled “PublicKeyToken”The public key token as a hex string, or null.
Returns: String
public string? PublicKeyToken { get; }RawBytes
Section titled “RawBytes”Gets the raw bytes of the file for hex editor display.
Returns: ReadOnlyMemory<Byte>
public ReadOnlyMemory<byte> RawBytes { get; }ReadyToRunCodeImage
Section titled “ReadyToRunCodeImage”The analyzer whose bytes hold this image’s precompiled native code — itself for a non-composite or composite image, or the resolved owner composite for a composite component. Null when this is not a ReadyToRun image or the code image cannot be resolved.
Returns: AssemblyAnalyzer
public AssemblyAnalyzer? ReadyToRunCodeImage { get; }ReadyToRunComponents
Section titled “ReadyToRunComponents”The component assemblies of a composite ReadyToRun image, each with its resolution state, or an empty list for a non-composite image or before resolution.
Returns: IReadOnlyList<ReadyToRunComponent>
public IReadOnlyList<ReadyToRunComponent> ReadyToRunComponents { get; }ReadyToRunIndex
Section titled “ReadyToRunIndex”The queryable index over this image’s precompiled methods, or null when the image is not ReadyToRun or its method-map tables are unavailable, malformed, or over budget. Built lazily from ReadyToRunMethods.
Returns: ReadyToRunIndex
public ReadyToRunIndex? ReadyToRunIndex { get; }ReadyToRunInfo
Section titled “ReadyToRunInfo”The crossgen2 ReadyToRun header facts, or null when the image does not claim to be ReadyToRun. Present (with a diagnostic Status) even for a corrupt or unsupported header, so a broken image is surfaced rather than hidden. Probed lazily regardless of HasMetadata (composite images have no own metadata).
Returns: ReadyToRunInfo
public ReadyToRunInfo? ReadyToRunInfo { get; }ReadyToRunMetadataProviders
Section titled “ReadyToRunMetadataProviders”The distinct metadata providers backing this ReadyToRun image — itself for a non-composite one, or the resolved component assemblies for a composite. Used to find a method that is present in a component’s metadata but absent from the precompiled map. Empty when this is not a ReadyToRun image.
Returns: IReadOnlyList<AssemblyAnalyzer>
public IReadOnlyList<AssemblyAnalyzer> ReadyToRunMetadataProviders { get; }ReadyToRunMethods
Section titled “ReadyToRunMethods”The precompiled methods of a ReadyToRun image joined to their native code ranges, or an empty list when this is not a usable ReadyToRun image or its method-map tables are malformed or exceed their traversal budget. The remaining ReadyToRun header, section, and managed metadata remain available. Built lazily from the entry-point tables. For a non-composite image the code lives in this file; composite resolution is layered on in ReadyToRunImageReader.
Returns: IReadOnlyList<ReadyToRunMethodEntry>
public IReadOnlyList<ReadyToRunMethodEntry> ReadyToRunMethods { get; }ReadyToRunSections
Section titled “ReadyToRunSections”The ReadyToRun section table — the Native AOT module sections for a Native AOT binary, or the crossgen2 sections (ids 100–126) for a classic ReadyToRun image — or an empty list otherwise. Both feed the PE/Metadata “R2R Sections” tab.
Returns: IReadOnlyList<RtrSection>
public IReadOnlyList<RtrSection> ReadyToRunSections { get; }RecoveredTypes
Section titled “RecoveredTypes”Types and method names recovered from a Native AOT binary’s embedded NativeFormat metadata (ReadyToRun section 313, or the reduced stack-trace metadata in 326). Empty when this is not a Native AOT binary or the binary carries no readable metadata. Malformed, cyclic, or excessively large metadata yields the fully decoded prefix.
Returns: IReadOnlyList<RecoveredType>
public IReadOnlyList<RecoveredType> RecoveredTypes { get; }Resources
Section titled “Resources”Gets the manifest resources defined in the assembly.
Returns: IReadOnlyList<ResourceInfo>
public IReadOnlyList<ResourceInfo> Resources { get; }Sections
Section titled “Sections”Gets the PE sections.
Returns: IReadOnlyList<SectionInfo>
public IReadOnlyList<SectionInfo> Sections { get; }SourceBundlePath
Section titled “SourceBundlePath”If this assembly was loaded from a single-file bundle, the path to the bundle file. Used as resolution context when probing for referenced assemblies.
Returns: String
public string? SourceBundlePath { get; }SourceLink
Section titled “SourceLink”Gets decoded Source Link information from the portable PDB.
Returns: SourceLinkInfo
public SourceLinkInfo SourceLink { get; }TargetFramework
Section titled “TargetFramework”The target framework moniker (e.g., “.NETCoreApp,Version=v10.0”), or null.
Returns: String
public string? TargetFramework { get; }TypeDefs
Section titled “TypeDefs”Gets the TypeDef metadata table entries.
Returns: IReadOnlyList<TypeDefInfo>
public IReadOnlyList<TypeDefInfo> TypeDefs { get; }TypeRefs
Section titled “TypeRefs”Gets the TypeRef metadata table entries.
Returns: IReadOnlyList<TypeRefInfo>
public IReadOnlyList<TypeRefInfo> TypeRefs { get; }WasmModuleInfo
Section titled “WasmModuleInfo”Parsed WebAssembly module facts when this file is a raw .wasm module, or null for
PE, ELF, and Mach-O inputs. The main .NET browser-wasm native module is
dotnet.native.wasm. Malformed modules preserve the safely decoded prefix and report
the reason through Diagnostic.
Returns: WasmModuleInfo
public WasmModuleInfo? WasmModuleInfo { get; }WebcilInfo
Section titled “WebcilInfo”Parsed Webcil provenance when this analyzer opened a Webcil managed assembly directly or unwrapped one from a WebAssembly container. Null for PE, raw Wasm, ELF, and Mach-O inputs.
Returns: WebcilInfo
public WebcilInfo? WebcilInfo { get; }Methods
Section titled “Methods”AttachPreIlcCompanions()
Section titled “AttachPreIlcCompanions()”Opens the probed pre-ILC managed input (and validated local references) as an attached companion set. Idempotent — a second call returns the existing set. Returns null when there is nothing attachable or the companion cannot be opened. The set is owned by this analyzer and disposed with it.
Returns: PreIlcCompanionSet
public PreIlcCompanionSet? AttachPreIlcCompanions()DetachPreIlcCompanions()
Section titled “DetachPreIlcCompanions()”Detaches and disposes the pre-ILC companion set and drops the correlation index. A concurrent index build observes the generation change and never publishes.
public void DetachPreIlcCompanions()Dispose()
Section titled “Dispose()”public void Dispose()GetEmbeddedSource(MethodDefInfo)
Section titled “GetEmbeddedSource(MethodDefInfo)”Gets the first embedded source document referenced by a method’s sequence points.
Parameters:
method(MethodDefInfo): The method whose source should be resolved.
Returns: EmbeddedSourceInfo
The decoded embedded source, or null when none is available or its data is malformed or exceeds the supported size limit.
public EmbeddedSourceInfo? GetEmbeddedSource(MethodDefInfo method)GetEmbeddedSource(string)
Section titled “GetEmbeddedSource(string)”Gets embedded source for a portable PDB document path.
Parameters:
documentPath(String): The document path from the portable PDB.
Returns: EmbeddedSourceInfo
The decoded embedded source, or null when the document has none or its data is malformed or exceeds the supported size limit.
public EmbeddedSourceInfo? GetEmbeddedSource(string documentPath)GetMetadataReader()
Section titled “GetMetadataReader()”Gets the underlying MetadataReader for advanced queries. Returns null if the file has no .NET metadata.
Returns: MetadataReader
public MetadataReader? GetMetadataReader()GetMethodBody(MethodDefInfo)
Section titled “GetMethodBody(MethodDefInfo)”Gets the method body bytes for IL disassembly. Returns null if the method has no IL body (abstract, extern, or native).
Parameters:
method(MethodDefInfo): The method definition to get the body for.
Returns: MethodBodyBlock
The method body block, or null. The returned block references analyzer-owned storage and must not be used after this analyzer is disposed.
Exceptions:
- BadImageFormatException: The method RVA maps to a malformed or truncated method body.
- ObjectDisposedException: This analyzer has been disposed.
public MethodBodyBlock? GetMethodBody(MethodDefInfo method)GetMethodDebugInfo(MethodDefInfo)
Section titled “GetMethodDebugInfo(MethodDefInfo)”Gets portable PDB debug information for a method definition.
Parameters:
method(MethodDefInfo): The method definition to inspect.
Returns: MethodDebugInfo
Decoded portable PDB information, or an empty result when no portable PDB is available.
public MethodDebugInfo GetMethodDebugInfo(MethodDefInfo method)GetPdbReader()
Section titled “GetPdbReader()”Gets the portable PDB MetadataReader, or null when no portable PDB is available.
Returns: MetadataReader
public MetadataReader? GetPdbReader()IsFrameworkAssembly(AssemblyProvenance, AssemblyRefInfo, string?, string?)
Section titled “IsFrameworkAssembly(AssemblyProvenance, AssemblyRefInfo, string?, string?)”Classifies whether an assembly belongs to the .NET framework surface regardless of deployment model. Returns true when the node was located through the shared framework or runtime directory, or when its identity matches a well-known Microsoft framework public key token, or when the shared-framework locator recognizes its simple name for the supplied target framework. This classification is used by the TUI framework-filter toggle so framework assemblies shipped inside a self-contained publish or single-file bundle are filtered consistently with framework assemblies loaded from the shared runtime.
Parameters:
provenance(AssemblyProvenance): How the node was located.identity(AssemblyRefInfo): The resolved assembly’s identity.targetFramework(String): The referencing assembly’s target framework moniker.preferredRuntimePack(String): The referencing assembly’s preferred runtime pack.
Returns: Boolean
true if the node represents a framework assembly.
public static bool IsFrameworkAssembly(AssemblyProvenance provenance, AssemblyRefInfo identity, string? targetFramework, string? preferredRuntimePack)ReadyToRunMetadataProviderFor(Guid)
Section titled “ReadyToRunMetadataProviderFor(Guid)”The analyzer whose ECMA-335 metadata backs the given module — this image for a non-composite one, or the resolved component assembly for a composite. Falls back to this analyzer.
Parameters:
mvid(Guid): The module version id of the owning assembly.
Returns: AssemblyAnalyzer
public AssemblyAnalyzer ReadyToRunMetadataProviderFor(Guid mvid)ResolveAssembly(string, string, string?, string?, string?)
Section titled “ResolveAssembly(string, string, string?, string?, string?)”Resolves a referenced assembly name to a file on disk or bytes from a bundle.
Probes: app-local, contained NuGet package assets named by .deps.json,
runtime directory, source bundle, host process bundle, adjacent bundles, and
.NET shared framework.
Parameters:
referencingAssemblyPath(String): Path of the assembly that references the target.assemblyName(String): Assembly name without extension (e.g. “System.Runtime”).targetFramework(String): Target framework moniker for version-matched shared framework probing.preferredRuntimePack(String): Preferred runtime pack to probe first (e.g. “Microsoft.AspNetCore.App”).sourceBundlePath(String): If the referencing assembly came from a bundle, the bundle path.
Returns: ResolvedAssembly
The resolved assembly, or null if not found.
public static ResolvedAssembly? ResolveAssembly(string referencingAssemblyPath, string assemblyName, string? targetFramework = null, string? preferredRuntimePack = null, string? sourceBundlePath = null)ResolveAssemblyByIdentity(string, AssemblyRefInfo, string?, string?, string?, NetFxBindingContext?)
Section titled “ResolveAssemblyByIdentity(string, AssemblyRefInfo, string?, string?, string?, NetFxBindingContext?)”Resolves a referenced assembly by full identity (name, version, culture, public key token). Probes every stage of String) and accepts only candidates whose manifest identity matches the requested identity exactly. If no probe produces a full match but at least one probe produces a simple-name match whose identity differs, returns IdentityMismatch with the path of that candidate — the graph does not expand from mismatched files.
Parameters:
referencingAssemblyPath(String): Path of the assembly that references the target.identity(AssemblyRefInfo): The full identity the caller expects to resolve.targetFramework(String): Target framework moniker for shared-framework probing.preferredRuntimePack(String): Preferred runtime pack name.sourceBundlePath(String): Bundle path, when the referencing assembly came from a bundle.netFxBindingContext(NetFxBindingContext): Per-root .NET Framework binding context, or null for non-net48 roots. When supplied, the resolution routes through NetFxBindingContext) instead of the .NET Core probe chain, faithfully modeling the CLR’s framework unification + machine.config
- publisher policy + app config + GAC + Framework[64] runtime + codeBase + appBase order.
Returns: AssemblyResolution
An AssemblyResolution carrying the resolved assembly, provenance, optional candidate-probe path, and (for net48 roots) the applied policy and loaded identity.
public static AssemblyResolution ResolveAssemblyByIdentity(string referencingAssemblyPath, AssemblyRefInfo identity, string? targetFramework = null, string? preferredRuntimePack = null, string? sourceBundlePath = null, NetFxBindingContext? netFxBindingContext = null)ResolveAssemblyPath(string, string)
Section titled “ResolveAssemblyPath(string, string)”Backward-compatible wrapper that resolves to a file path only.
Returns null for bundle-backed results.
Parameters:
Returns: String
public static string? ResolveAssemblyPath(string referencingAssemblyPath, string assemblyName)ResolveSourceLinkUrl(string)
Section titled “ResolveSourceLinkUrl(string)”Resolves a portable PDB document path through Source Link mappings.
Parameters:
documentPath(String): The document path from the portable PDB.
Returns: String
The resolved Source Link URL, or null when no mapping applies.
public string? ResolveSourceLinkUrl(string documentPath)ResolveToken(int)
Section titled “ResolveToken(int)”Resolves a metadata token to a human-readable name.
Parameters:
token(Int32): The metadata token to resolve.
Returns: String
A display string for the token. Constructed generic methods include their decoded type arguments; malformed or unsupported metadata is returned as the original hexadecimal token.
public string ResolveToken(int token)