Table of Contents

TryResolveFromPath Method

Definition

TryResolveFromPath(string, out string)

Attempts to resolve the nearest target framework moniker found in the specified path.

public static bool TryResolveFromPath(string path, out string targetFrameworkMoniker)

Parameters

path string

The path whose directory hierarchy should be inspected for a target-framework-like folder name.

targetFrameworkMoniker string

When this method returns, contains the nearest resolved target framework moniker found in the specified path, or null if the operation failed.

Returns

bool

true if a target framework moniker was resolved successfully from the specified path; otherwise, false.