In NAnt, I have a very simple property to get the root of my project, it looks like this:
<property name="project.root.folder" value="${directory::get-parent-directory(directory::get-parent-directory(project.local.folder))}" />
This brings me to the root of my project, from which I build all my paths.
In MSBuild, I can use $(MSBuildProjectDirectory) to get my current directory, but I would like to get the full path to the parent directory. NAnt uses directory::get-parent-directory which works charmingly and I hope something like this is available in MSBuild.
I found a previous similar question ( https://stackoverflow.com/a/312947/ ), but I think there should be something more accessible, of course!
Sam :)
samaspin
source share