Table of Contents

TryResolve Method

Definition

TryResolve(Assembly, out string)

Attempts to resolve the target framework moniker of the specified assembly.

public static bool TryResolve(Assembly assembly, out string targetFrameworkMoniker)

Parameters

assembly Assembly

The Assembly to inspect for a TargetFrameworkAttribute.

targetFrameworkMoniker string

When this method returns, contains the resolved target framework moniker of the specified assembly, or null if the operation failed.

Returns

bool

true if the target framework moniker of the specified assembly was resolved successfully; otherwise, false.

Exceptions

ArgumentNullException

assembly is null.