0

Is there any tutorial to show how can I use MSBuild tasks like FtpUploadDirectoryContent to copy file/directory to a remote host using FTP in Team Build 2010? I never used a MSBuild task in TFS 2010.

Afshar Mohebi
  • 10,479
  • 17
  • 82
  • 126

2 Answers2

1

Just put it in the AfterBuild target of one of your projects - probably best to put it in the project that's at the top of your dependency graph. You can add a condition if you don't want it to run in Visual Studio, or if you only want to do the FTP transfer for a particular build configuration. For example:

<Project>
    ...
    <Target Name="AfterBuild" Condition="'$(BuildingInsideVisualStudio)'!='true'" >
        <!-- Insert your FTP task here -->
    </Target>
</Project>

See How to: Extend the Visual Studio Build Process

Jim Lamb
  • 25,355
  • 6
  • 42
  • 48
1

You might consider modifying your build process template (WF) and using the InvokeProcess activity call out to FTP.exe.

There are also a handful of FTP activities and command line utilties if the built in Windows FTP command line client doesn't work for you.

Ryan Cromwell
  • 2,613
  • 1
  • 17
  • 33
  • If you need information how to modify the build process template see http://www.ewaldhofman.nl/?tag=/build+2010+customization – Ewald Hofman Aug 30 '10 at 17:43