For instance, just search for "BuildDetail.DropLocation" BuildDirectory
in Google, I only get 42 results. BUT thoses 2 parameters are essentials to my Workflow !
Update : The complete documentation on "Team Foundation Build Activities" is now available (Dec 9th 2010) http://msdn.microsoft.com/en-us/library/gg265783.aspx
Here are a list of other handy parameters that I use :
In C#, we have :
BuildDetail.DropLocation = "\\MyBuildServer\TFSDropBuild\Dev_Night\Dev_Night_20101202.6"
In order to have the name of the last sub-folder, you could use a quick and dirty trick (I hope there's a better solution somewhere hidden in the MSDN) :
Arguments = BuildDetail.DropLocation + " " + BuildDetail.DropLocation.Substring(BuildDetail.DropLocation.LastIndexOf("\") + 1)
Note : Even if it is not obvious, you can write some code in the "FileName" field. Warning, it'll look like you can write C# code (since the SubString(), '+' operator, etc... works) BUT you have to write that as a VB.Net expression, for instance :
- "Hello World.This works".Split(Convert.ToChar("."))(0)
that replaces the need for doing :
Here is the detail of the POC Batch file to make sure that the expression in the "FileName" field works, with input parameters sent by WF4 :
REM Create a unique identifier
REM %1 is for instance \\MyBuildServer\TFSDropBuild\Dev_Night\Dev_Night_20101202.6
DIR *.* > %1\myNewCreatedFile_%fileName%.txt
DIR *.* > %1\myNewCreatedFile_%2_%fileName%.txt