FTP and WF in TFS

Following the creation of my FTP WF tasks that I created here, I then went to add those tasks into the TFS Workflow.  I already have created a special template and found where I want to add the tasks here so it was only a matter of dropping the tasks into the WF, right?  Wrong.  The WF templates are not part of any given project, so you can’t just create WF tasks in a project and reference them in the template.  You need to add them to the toolbar and to do that, you need to create the tasks in an independent project.  I first tried to right click on the toolbox and add a reference to the project that I just created, however when I went to drag…drop the task into the designer, I got the red “no” symbol.  After some research, I found this post – I have to add these activities to the GAC.  After strong naming the original project and using GACUtil, I then could navigate to C:\Windows\Microsoft.NET\assembly\GAC_MSIL (not C:\Windows\assembly btw) and bring the FTP tasks in.  Interestingly, the top-level task (the sequence) did not “bubble up” the child in and out parameters so I had to drag the 3 actual code activities from the designer and place them into the TFS WF.


Once I did that, I need to hook up the build directory to the source for the FTP Copy Directory task.  I didn’t try to alter the path at all, so I had to use the fully-qualified path as so:


This corresponds to the file system like this:


Note that I am only copying the website (the same way VS2010 does it) and I am not copying the source code or the debugging symbols.

After completing that task, I then checked the project into source control (Development to Main to Release). The build kicked off and the files moved up to the host as expected:



I would like to then refactor the WF activities to take all of the code behind and put them on the designer, but that is next week – once I implement these FTP activities to all of the websites that I maintain.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: