Using the TFS Build Custom Activity "DownloadFiles"
-
15. července 2010 10:33I am attempting to use the DownloadFiles activity in a TFS Build Template (created in VS2010) to download a set of labelled files from version control to my sources directory. I have added microsoft.teamfoundation.build.workflow.activities.downloadfiles to the build template using the workflow designer and set the ServerPath property to the version control path I want to download files from and the LocalPath property to my destination. The ServerPath is set to "$/Sirius_Build_PoC/Sirius-P1.53_LIByPhone/*.*" and the LocalPath to the value of SourcesDirectory, which in this case is "C:\Builds\1\Sirius_Build_PoC\SiriusPatchDeploy\Sources". When the activity executes I get the error message "TF10122: The path 'C:\Builds\1\Sirius_Build_PoC\SiriusPatchDeploy\Sources\$\Sirius_Build_PoC\Sirius-P1.53_LIByPhone\application\Rrp.BusinessEntity\View\HoldingServices\HoldingView.xml' contains a '$' at the beginning of a path component. Remove the '$' and try again.". But if I remove the "$/" from the ServerPath, I get the error: "TF10125: The path 'Sirius_Build_PoC\Sirius-P1.53_LIByPhone\*.*' must start with $/". How can I get this activity to work? This activity doesn't appear to be documented anywhere in MSDN.
Všechny reakce
-
16. července 2010 3:26Moderátor
Hi Dan,
Though $ is not supported in WF XAML, you can pass the left Sirius_Build_PoC\Sirius-P1.53_LIByPhone\*.* to the activity, and in you own code, add $/ before this argument.
Best regards,
Ruiz
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com -
19. července 2010 8:19
Thanks, Ruiz, but I don't understand the reference to "own code" - the activity I am trying to use is the "DownloadFiles" activity which comes "out of the box" and is listed in the "Team Foundation Build Activities" group in the Toolbox- Navržen jako odpověď Justin M Frazier 22. července 2010 18:41
-
22. července 2010 18:55
The way I handled this was to create 2 variables for the sequence and just reference those variables in the workflow.
varInput = "$/Sirius_Build_PoC/Sirius-P1.53_LIByPhone/*.*"
varOutput = "C:\Builds\1\Sirius_Build_PoC\SiriusPatchDeploy\Sources"You might also want to look at the *.* at the end of the input. I did not use that and everything copied just fine.
-
10. listopadu 2010 6:55
Hi
Im getting the same error even after using the variables. I get an error and a warning as part of the DownloadFiles activity
Error:
TF10122: The path 'C:\Builds\$\GLSExternalReferences\Main' contains a '$' at the beginning of a path component. Remove the '$' and try again.
Warning:
TF270003: Failed to copy. Ensure the source directory $/GLSExternalReferences/ exists and that you have the appropriate permissions
The account that runs the build has permission to access file from the version contol.
Any ideas?
Regards
Binu
-
7. prosince 2010 23:01
hi,
I am facing the similar issue.
snippet of Error: contains a '$' at the beginning of a path component. Remove the '$' and try again.
I tried to remove and try, but it is giving error as
TF10125: The path 'MySource/*.*' must start with $/
Any pointers are appreciated. I dont see any help for the Activities though.
Thanks
Sudheer
Solution: Looks like i am able to resolve the issue by assigning the Recursion set as OnLevel or Full
- Navržen jako odpověď Sudheer KusumaMicrosoft Employee 8. prosince 2010 18:16
-
12. ledna 2011 22:04
I'm in the same boat as just about everyone else here. I cannot get the DownloadFiles workflow activity to work by pulling down everything in a folder in a workflow utilized by a Build Definition in Team Build 2010. The files are all checked in to Source Control, and I can pull files individually with the DownloadFile workflow activity or the DownloadFiles activity, but when it comes to pulling down everything in a folder, the DownloadFiles workflow activity fails. Using the DownloadFile is not a valid solution for more than a few files, and is a nightmare to maintain if the files change name or get deleted/added on a regular basis.
Also, it does not appear that this has been addressed in TFS 2010 SP1 Beta.
-
29. března 2011 18:16
what's the solution to this?? What has everyone else been doing with dlls that cannot be added as references to the project? Since they are win32 dlls I cannot add them as references so therefore they do not get built and copied to the BinariesDirectory. My only solution is to use the DownloadFiles activity but I am also getting the same error as above. So either nobody ever writes programs in .net that requires this or people are doing it another way.
Assigning the Recursion set as OnLevel or Full does not seem to solve the issue for me.
-
6. dubna 2011 19:38
I've faced the same trouble described here. Finally I got this working after several trials and errors.
The Files I wanted to get were at "$/MySharedStuff/DeploymentTools"
And Wanted to get them to a Local Path generated dynamically as "C:\Builds\1\MyProject\DummySolution\Sources\DummySolution\Deploy\"
The configuration that worked was:DeletionId = 0 LocalPath = C:\Builds\1\MyProject\DummySolution\Sources\DummySolution\Deploy\ Recursion = Full ServerPath = $/MySharedStuff/DeploymentTools Version = T
Note the server path not ending in forward slash!Having server path as
$/MySharedStuff/DeploymentTools/
or
$/MySharedStuff/DeploymentTools/*.*
Caused the TF10122 error.
Hope this helps. Best regards- Navržen jako odpověď Ajit Yadav 22. července 2011 12:53
-
22. července 2011 12:53Thanks much Diego, that worked for me!!!!
-
3. dubna 2012 12:54Diego, you made my day - thanks!
-
20. dubna 2012 10:27
still not sure what do you mean by Version = T ?
-
6. srpna 2012 12:02
T is a kind of Versionspec
when you use T the versionspec is LatestVersion, C to Changeset, D to Date, L to label and W to workspace version
-
28. února 2013 9:04thank you Diego; it worked also for me.
Daniel