Table of Contents

TryResolveCurrent Method

Definition

TryResolveCurrent(out string)

Attempts to resolve the target framework moniker of the current application context.

public static bool TryResolveCurrent(out string targetFrameworkMoniker)

Parameters

targetFrameworkMoniker string

When this method returns, contains the resolved target framework moniker of the current application context, or null if the operation failed.

Returns

bool

true if the target framework moniker of the current application context was resolved successfully; otherwise, false.

Remarks

Resolution first inspects the entry assembly for a TargetFrameworkAttribute. If no supported framework name is found, the directory hierarchy rooted at BaseDirectory is inspected for a target-framework-like folder name.