How would code to verify hintPaths are resloving correctly?

pemby

New member
Joined
Jul 27, 2021
Messages
2
Programming Experience
5-10
How would you resolve hint paths in a csproj file?

I am thinking CD to the working directory then, resolve relative (HintPath) to the full path, then test if vaild dir.

Is this a vaild test? Also, would you approach this task differently?
 
Verify that the the relative path is truly a relative path. As per the documentation, HintPath can be an absolute path.

If it is an relative path, Path.Combine() the working directory and the relative path. Check if the directory exists.
 
This looks to be an interest SO question and answer that may also influence what you are trying to do...

 
Back
Top Bottom