I have some Test, Security, Project Management and some other word documents in TFS2010 source control under Documents folder. Does anybody know how to access them in order to download and copy to a local path?
Those files are not physically under $/… folder, though they have a Sharepoint web server path like: “http://myServer/sites/MyProyect/Test/Tests_P13_F00120.doc“. I have tried to use DownloadFiles activity without success due to it needs a path which starts with $/. Any suggestion please?
DownloadFilesis not an activity you can make use of, it’s meant to deal with files residing in Source control.Instead, you need to establish a connection to the Sharepoint Copy service of your TFS, which resides at
http://<Site>/_vti_bin/Copy.asmx. We did this by adding a Service Reference in our build solution.We then implemented a build activity that does basically the opposite of what you are after: during TFS build it uploads documents into Sharepoint.
The instantiation looks like this:
This copy service exposes a
GetItemmethod, this is the one you should probably be invoking.I ‘m not aware if this
GetItemis capable of supporting ahttp://myServer/sites/MyProject/Test/*.dockind of thing