rwoodford
rwoodford

Reputation: 135

TFS2010: Need the Absolute Path of the Source Directory

I am invoking VSDBCMD.EXE in my build process template, there is a custom setvar parameter that requires a reference to the current source directory, passing this path has become an unexpected challenge.

I've tried using relative paths and $(SourceDirectory) to no avail (it remains as the literal string "$(SourceDirectory)" when I see the debug output), the parameter needs an absolute path.

Is there any way to get the absolute path for the current source directory when the script runs?

Upvotes: 2

Views: 2373

Answers (2)

pantelif
pantelif

Reputation: 8544

It might be worth checking out this resource, where author makes use of ConvertWorkspaceItem within his build in order to pass in a string the disk location of a know target in source control

Upvotes: 1

Dylan Smith
Dylan Smith

Reputation: 22245

In the DefaultTemplate build workflow there is a variable called SourcesDirectory that contains the absolute path.

If you pass it to an InvokeProcess you just type the variable name in the activity property, no $() around it.

Upvotes: 6

Related Questions