If you read the documentation of NDepend.Console.exe you learn that relative paths are not supported. These remarks also apply to paths provided with options /InDirs /OutDir and /XslForReport.
Here you can see the result of a wrong line command
and here the result of a right line command
Unfortunately this is a problem for my solutions cause I need always relative path. My solution are continuous integrated using TeamCity and in my setup the build agent checks out sources in a random folder on the build agent machine (for eg. C:\BuildAgent\work\12724a65ddd4c6d0).
Here the Version Control Settings page of my project inside my TeamCity server where you can set the checkout directory.
Using relative path for me is a plus cause allow developers to freely decise the checkout project folder. For some of our customer this has been a project requirement.
Ok now you know why I need relative paths. Now I want to explain how I use NAnt + NDepend inside my continuous integrated solution.
This is the target I use to run NDepend.Console.exe.
As you can see using the directory::get-current-directory I can build an absolute path at run-time. Maybe this result can be obtained using the built-in property ${nant.project.basedir} but this is marked as deprecated so I prefer to use the directory::get-current-directory function.