Team Foundation Build Activitie "DownloadFiles" is giving error

Go To StackoverFlow.com

1

I am customizing the default build process template in TFS 2010.

i am using "DownloadFiles" build activity and in server path i have given "$/TFS/Libraries/Foo.DLL", when i run the execute definition its throwing error as "Access to the path '\ServerName\SharedFolder\BuildName\TempFolder' is denied.".

But when i give server path as "$/TFS/Libraries" its downloading all the files in Libraries folder into shared TempFolder.

But i need do download only one file. Please help..

Thanks in advance..

2012-04-04 08:27
by BABA


1

Now, DownloadFiles does work for a whole folder only:

  • ServerPath="$/proj/path" - works great, all is downloaded to LocalPath.
  • ServerPath="$/proj/path/name.ext" - borked.

I've de-compiled DownloadFiles to see why: First it gets a list of server items, in our case just $/proj/path/name.ext. Then, it calculates the local path like this:

localItemPath = Path.Combine(LocalPath,VersionControlPath.MakeRelative(ServerItem, ServerPath));

In this line, the activity assumes that ServerPath is a path. If it's not, then MakeRelative will not recognize it, and the local path will be LocalPath/$/proj/path/name.ext, as the OP has observed.

Also, if ServerPath is not canonical - for example, $/proj/path/../path2, the same will happen. Solution: use VersionControlPath.GetFullPath(myNonCanonicalPath).

2013-10-28 14:14
by Jonathan


0

You need to grant the user running the build service with write permissions on the shared folder.

http://msdn.microsoft.com/en-us/library/cc668757.aspx

2012-04-04 09:38
by KMoraz
Team Foundation Build Service is running under "TFSService" user account, and this account has full control on the shared location and added in the "Project Collection Build Service Accounts".. downloading folder is working fine, but downloading single file has problems - BABA 2012-04-04 09:51


0

There are two separate Build activities, DownloadFiles for a folder ServerItem and a DownloadFile for a single file ServerItem.
I'd expect it should work with DownloadFile.

2012-04-06 09:15
by pantelif
DownloadFile appears to be deprecated: http://msdn.microsoft.com/en-us/library/vstudio/gg265783.aspx#ActivityDownloadFile - Jonathan 2013-10-28 12:59
Ads