Table of Contents

Class TargetRuntimeProber

Namespace
AsmResolver.DotNet
Assembly
AsmResolver.DotNet.dll

Provides helper methods for inferring the .NET target runtime of an existing PE image.

public static class TargetRuntimeProber
Inheritance
TargetRuntimeProber
Inherited Members

Methods

ExtractDotNetRuntimeInfo(IResolutionScope)

Maps the corlib reference to the appropriate .NET or .NET Core version.

public static DotNetRuntimeInfo ExtractDotNetRuntimeInfo(IResolutionScope corLibScope)

Parameters

corLibScope IResolutionScope

Returns

DotNetRuntimeInfo

The runtime information.

TryGetLikelyTargetRuntime(in MetadataStreamSelection, out DotNetRuntimeInfo)

Obtains the name and version of the .NET runtime a provided metadata stream selection likely is targeting.

public static bool TryGetLikelyTargetRuntime(in MetadataStreamSelection streams, out DotNetRuntimeInfo targetRuntime)

Parameters

streams MetadataStreamSelection

The metadata streams to classify.

targetRuntime DotNetRuntimeInfo

The likely target .NET runtime version.

Returns

bool

true if the runtime could be determined, false otherwise.

TryGetLikelyTargetRuntime(PEImage, out DotNetRuntimeInfo)

Obtains the name and version of the .NET runtime a provided PE image likely is targeting.

public static bool TryGetLikelyTargetRuntime(PEImage image, out DotNetRuntimeInfo targetRuntime)

Parameters

image PEImage

The image to classify.

targetRuntime DotNetRuntimeInfo

The likely target .NET runtime version.

Returns

bool

true if the runtime could be determined, false otherwise.