Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to copy file in tfs 2010 build process template?

I can see that there is a copyDirectory activity, but no copyFile activity. Is there any way to copy only one file from directory?
Or maybe there is a way to delete a single file from directory?

Thank you for your help.

like image 386
Brezhnews Avatar asked Mar 16 '12 08:03

Brezhnews


3 Answers

There is no FileCopy activity. You can 1) develop your own custom activiy or 2) use the InvokeMethod.

like image 117
Morten Frederiksen Avatar answered Nov 17 '22 01:11

Morten Frederiksen


You don't have to write your own activity. Try to use TFS Build Extensions instead. There is a RoboCopy workflow activity you can use to copy files. there are a lot of other very useful activities like E-mail activity, ...

Follow this nice guide to modify DefaultTemplate workflow or any workflow inside BuildProcessTemplates folder.

like image 4
Ludwo Avatar answered Nov 17 '22 01:11

Ludwo


I would use the InvokeProcess activity and call the xcopy command in there with the correct arguments. See for an example: http://www.ewaldhofman.nl/post/2010/11/09/Part-15-Fail-a-build-based-on-the-exit-code-of-a-console-application.aspx

like image 2
Ewald Hofman Avatar answered Nov 17 '22 02:11

Ewald Hofman