Using FB7 with TFS 2012 - without build

We have an existing setup with TFS 2012 combined with FB7 where TFS builds the code and uses FB7 to deploy to our target servers.

I would like to create a build definition in TFS that does not build anything but merely triggers a FB7-script to do various sorts of file processing and deployment (essentially, I would like FB7 to xcopy the files from our TEST system and automatically deploy it to our PROD system).

We are using the FinalBuilderPostBuildTFS2012.xaml template for our TFS setup.

However, the “without build in TFS” is causing me some problems. When I edit the build definition and specify “Build 0 projects” in “/Process/Items to build”, TFS throws an exception from FinalBuilder saying that:

Exception Message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (type ArgumentOutOfRangeException)
Exception Stack Trace:    at lambda_method(Closure , ActivityContext )
   at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)<br>&nbsp; &nbsp;at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContextT<br>&nbsp; &nbsp;at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
   at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)<br>&nbsp; &nbsp;at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)


Is there any way around this? Am I right to assume that it is currently not possible with FB7?

Hi Jesper,

The “FinalBuilderPostBuildTFS2012.xaml” template will perform a MSBuild, Test, then run a FinalBuilder script (in general terms). Also the “FinalBuilder” activity expects to be passed the solution/projects which are being built. These are passed onto the FinalBuilder script which is run.

The simplest way to achieve what your after is to use the “FinalBuilderBuild.xaml” workflow. It requires being passed a solution/project, if this doesn’t make sense in this context simply create a dud project to pass it and include in your source control. This isn’t perfect, however it will remove the error your seeing.

The other way to go is to create a new workflow based on the “Run FinalBuilder” activity. This is typically hidden inside the call to “FinalBuilder” activity which extracts all the information form the build which is required for FinalBuilder to run. The error your seeing is the attempt by the “FinalBuilder” activity to extract the list of projects which are being built. Something which is required to be passed by all included workflows in a FinalBuilder install.