Reputation: 25349
Team,
Its frustrating so far today with TFS 2012, I have been queuing a build and the build server is unable to copy/drop to the specified folder. I have installed TFS 2012 on Win Server 2008 R2. Basically the error says that the access to the destination folder is denied and so it is not able to copy. The TFS admin console shows the build service is running as LocalService. And I granted full control to the local Service account to the drop folder. I tried to even fiddle with Share tab in the properties of the folder. There is no network as such any way, only single machine with all the TFS services running on it. I even tried to put the drop folder on C drive itself without any success. Can some one please throw some light? What am I missing? Seems to be some thing trivial.
The following is the exception details.
Exception Message: TF270016: An error occurred publishing log files from 'C:\Builds\1\Tfs_TeamProjectTrail\Tfs_Trial1_CI\Sources\Main\Tfs_Trial1\Tfs_Trial1.log' to '\localhost\d$\VD\Tfs_Trial1_CI\Tfs_Trial1_CI_20130309.21\logs'. Details: Access to the path '\localhost\d$\VD\Tfs_Trial1_CI\Tfs_Trial1_CI_20130309.21\logs' is denied. (type PublishLogFileException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Inner Exception Details:
Exception Message: Access to the path '\localhost\d$\VD\Tfs_Trial1_CI\Tfs_Trial1_CI_20130309.21\logs' is denied. (type UnauthorizedAccessException) Exception Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at Microsoft.TeamFoundation.Common.FileSpec.CopyFile(String oldPath, String newPath, Boolean overwriteExisting) at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory) at Microsoft.TeamFoundation.Build.Workflow.Activities.WindowsDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory, String[] renameIfExists) at Microsoft.TeamFoundation.Build.Workflow.Activities.PublishLogFile.Execute(CodeActivityContext context)
Upvotes: 9
Views: 7418
Reputation: 2320
[TFS2013] I had this error when I turned off the drop folder option, and removed the path. By specifying a drop folder again (UNC) for the output files in the build configuration solved the problem.
It seems TFS is twitchy if you don't have a drop folder at all, even though it gives you the option to not have one.
Upvotes: 0
Reputation: 21
Default account with which tfs build service is run is nt authority\network service
. After compiling solution\project, it is this user which tries to copy bits to the build share.
So add permissions to this account on your build share.
Upvotes: 2
Reputation:
Simply make sure Drop directory and Build service have full privilegies for "Local service" group.
Upvotes: 3
Reputation: 4535
This is just a permissions issue.
I don't currently have time to write a complete answer, but I can expand later.
ProcMon is also a great program to use when troubleshooting this kind of thing.
I think this is a good starting point.
Upvotes: 11