Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "$(SourceDir)" in Microsoft Team Foundation Server?

I'm working with Microsoft Team Foundation Server and MSDN has been fantastic so far with providing all the information I've needed and so much more--except in one spot.

I'm creating an automated build and under Workspace > Working Folders > Build Agent Folder, it has "$(SourceDir)" as default.

I can't seem to figure out what that is actually referencing. Is it pointing toward the folder that the solution is in, or something else?

like image 998
AmbiguousX Avatar asked Dec 16 '10 19:12

AmbiguousX


1 Answers

This is well explained in this article: List of variables like $(SourceDir).

For the workspace mapping dialog you can only use two variables to help with expansion:

$(BuildDir) - Expands to BuildAgent.BuildDirectory

$(SourceDir) - Expands to $(BuildDir)\Sources by default

The directory "Sources" is not hard-coded and may be changed by modifying the TfsBuildService.exe.config file on the build agent. If you open that file there will be an application setting called "SourcesSubDirectory". If you need a shorter path you may change this key to something like "s" instead of "Sources". If you made this change then the $(SourceDir) variable would expand to $(BuildDir)\s.

like image 190
Simon Mourier Avatar answered Sep 28 '22 05:09

Simon Mourier