NDepend.API Documentation
TryResolveAbsolutePathFromProject(IProject,IFilePath,IAbsoluteFilePath,String) Method
NDepend.Project Namespace > ExtensionMethodsProject Class > TryResolveAbsolutePathFromProject Method : TryResolveAbsolutePathFromProject(IProject,IFilePath,IAbsoluteFilePath,String) Method
The project used for resolving the absolute path.
The file path to resolve as absolute.
The result absolute file path if the resolving succeed.
A plain english failure description if the resolving fails.
This method attempts to resolve an absolute file path from a file path
Syntax
[Extension()]
public static bool TryResolveAbsolutePathFromProject( 
   IProject project,
   IFilePath filePath,
   out IAbsoluteFilePath absoluteFilePath,
   out string failureReason
)

Parameters

project
The project used for resolving the absolute path.
filePath
The file path to resolve as absolute.
absoluteFilePath
The result absolute file path if the resolving succeed.
failureReason
A plain english failure description if the resolving fails.

Return Value

true if the absolute path resolving succeed, else returns false.
Remarks
If filePath is prefixed with an environment variable, project is not used for resolving the absolute path.
If filePath contains path variable(s), variables declared in project.IProject.PathVariables are used for resolving the absolute path.
If filePath is relative to the project file, project.IProject.Properties.FilePath is used for resolving the absolute path.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsProject Class
ExtensionMethodsProject Members
Overload List