Where is $(System.DefaultWorkingDirectory) set for builds in TFS2015?

Moo picture Moo · Oct 6, 2016 · Viewed 16.5k times · Source

I'm trying to modify the value of this variable as it currently points to the source folder of whatever build gets run on the agent instead of the root of the build.

Does anyone know where I can modify this variable? I've looked at the agent's configuration .json file but didn't find anything relevant.

Answer

Cece Dong - MSFT picture Cece Dong - MSFT · Oct 7, 2016

You can define $(System.DefaultWorkingDirectory) in Variables tab in Build Definition.

I just had a quick test, if I define a new value to $(System.DefaultWorkingDirectory), the output in the task for $(System.DefaultWorkingDirectory) will be the new value:

enter image description here

enter image description here