问题
Is it possible to copy checked in files to a specific folder using a build definition or script? For example, if a check-in a file that is in a folder in TFS, on check-in can I copy that file to a server that has the same folder structure?
TFS
$/Website/files/index.html
Copy To
\ws-file01-dv\files\index.html
回答1:
You could easily setup a TFS Build that is triggered on Check-In (CI Build) that simply does a Get Latest then copies the source to a file share.
You would have to modify the DefaultTemplate.xaml, by default it already downloads the source to the Build Agent Working Directory, you just need to add a Copy Folder activity that copies it to the target file share. If you've never customized a build workflow before I recommend reading the ALM Rangers Guidance to learn how: http://vsarbuildguide.codeplex.com/
来源:https://stackoverflow.com/questions/17452813/visual-studio-tfs-check-in-migration