Friday, February 21, 2014

Relative deploy locations for visual studio 2012+

Working with team foundation server, you may end up having various publish profiles to publish various configurations. You can specify relative paths in the local folder location by adding something like the following:
$(MSBuildProjectDirectory)\..\..\..\Deploy\WebSite
Watch out that the $(MSBuildProjectDirectory) points to the folder that contains the pubxml file, so it points to \Properties\PublishProfiles folder. So, the 3 back in the path, end up in the solution folder (if there is one).

No comments: