NDepend.API Documentation
TryGetNDependProjectFilePathAttachedToVisualStudioSolution(IAbsoluteFilePath,IAbsoluteFilePath,String) Method
NDepend.DotNet.VisualStudio Namespace > IVisualStudioManager Interface > TryGetNDependProjectFilePathAttachedToVisualStudioSolution Method : TryGetNDependProjectFilePathAttachedToVisualStudioSolution(IAbsoluteFilePath,IAbsoluteFilePath,String) Method
The path to the Visual Studio solution file.
The path to the NDepend project file.
If this method returns false, this string contains a plain-english description of the reason why a NDepend project file path cannot be resolved.
Returns true if the visualStudioSolutionFilePath exists, and contains a ndependProjectFilePath that can be resolved to an absolute path.
Syntax
bool TryGetNDependProjectFilePathAttachedToVisualStudioSolution( 
   IAbsoluteFilePath visualStudioSolutionFilePath,
   out IAbsoluteFilePath ndependProjectFilePath,
   out string failureReason
)

Parameters

visualStudioSolutionFilePath
The path to the Visual Studio solution file.
ndependProjectFilePath
The path to the NDepend project file.
failureReason
If this method returns false, this string contains a plain-english description of the reason why a NDepend project file path cannot be resolved.
Remarks
If project attachment is done through the VS solutionn user options file (.suo) this method won't be able to retrieve the project attached. This method only deal with VS solution files (.sln).
Requirements

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

See Also

Reference

IVisualStudioManager Interface
IVisualStudioManager Members
Overload List