I decided to start using the TFS build vNext pipeline and came across a strange issue during the configuration of my build agent. I would like to know if anyone else can replicate this and if so, how eventually can I solve the issue.
I installed the agent in the following directory D:\TFS Build Agent\agent and executed the configuration. The procedure went well and the agent is added correctly inside the given pool. Also the service is running correctly on my build machine. However once I start a simple build I do get the following error:
09:10:23.570390 System.Management.Automation.ProviderInvocationException: Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'D:\TFS Build Agent\agent\tasks\VSBuild\1.0.11'. Access is denied ---> System.UnauthorizedAccessException: Access is denied ---> System.ComponentModel.Win32Exception: Access is denied
--- End of inner exception stack trace ---
at Microsoft.PowerShell.Commands.FileSystemProvider.GetFileSystemInfo(String path, Boolean& isContainer)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeThePath(String basepath, Stack`1 tokenizedPathStack)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePathHelper(String path, String basePath)
at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePath(String path, String basePath)
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(ProviderInfo provider, String path, String basePath, CmdletProviderContext context)
--- End of inner exception stack trace ---
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(ProviderInfo provider, String path, String basePath, CmdletProviderContext context)
at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(String path, String basePath, CmdletProviderContext context)
at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context)
at System.Management.Automation.PathIntrinsics.SetLocation(String path)
at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken)
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
09:10:23.570390 BaseLogger.LogConsoleMessage(scope.JobId = 88ecf41a-efe1-48d4-b67a-462b166f2b4c, message = ##[error]Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'D:\TFS Build Agent\agent\tasks\VSBuild\1.0.11'. Access is denied)
I tried to make sure to give all the full set of permissions for the account under which my service is running to the above mentioned folder, but it didn't changed anything.
Now I moved the files of the agent to the C drive to the C:\agent folder and re-done the same exact setup, and suddenly all worked as supposed.
Even if this solves my problem I would like to know more about this issue. Is this a bug or am I missing some specific privileges?
Can anyone replicate this issue?
Thanks
I tried again to replicate this but with no success. It seems that there was some issue at the time with the machine I worked on.