Changing TFS 2010 $(sourcedir)

Seemingly this can be set by editing the TfsBuildServer.exe.config on the build agent machine and changing the value of the following Key:

On a 2010 build agent this isn’t possible however if you look at the build definition -> Process Tab there is a parameter called “Sources Subdirectory” set the value here to force the same change as above. Note that the Build process template I am using is the “Upgrade Template” as all my builds are still in msbuild and not in the new Windows workflow.

If you are changing it on a build that has been run before then logon to the build servers that it as been run on and open a VS command console, cd to the build dir for the definition and execute the following command: tf workspaces /collection:http://:8080/tfs/

You can also mitigate this by editing the msbuild project file for the defination and in the BeforeGet target adding that command as a task using
:8080/tfs/’ />

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This blog is kept spam free by WP-SpamFree.