Get publish directory in MSBuild

msbuild

Solution

For me what worked was:

$(PublishUrl)

And i got what i was needing: My publish directory.

Thanks.

Problem

I have an asp.net mvc application that I am publishing with Publish feature of Visual Studio and I have a custom MSBuild task that needs the directory that I am publishing to so it knows where to copy some custom build files to... I've tried $(OutDir), $(PublishDirectory) and a bunch of others... how do I get this path?

Original source