Yes; we have code in `ProjectHelpers` that will do that.    (although it would be more efficient to pass the root path once per project when compiling the solution)

However, it won't work in unit tests.