Search code examples
tfsazure-devopstfsbuildtfs-2015azure-pipelines-release-pipeline

How to download artifact in TFS Linux agent?


I have created build and release definition in TFS 2017. In build definition I am publishing artifacts at windows server share path like \server\drop, When I am using those artifact in release pipeline which runs on Linux based agent getting below error.

An error occurred during download: System.NotSupportedException: Cannot download artifacts from a file share using OSX or Linux agent. You can download artifact from server or use a Windows agent.
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.BuildArtifact.<DownloadArtifactAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.Artifacts.BuildArtifact.<DownloadAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.ReleaseJobExtension.<>c__DisplayClass34_2.<<DownloadArtifacts>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Worker.Release.RetryExecutor.<ExecuteAsync>d__20.MoveNext()

Solution

  • The error message also includes two possible solutions to the problem. Choose one:

    Cannot download artifacts from a file share using OSX or Linux agent. You can download artifact from server or use a Windows agent.

    • Stop using file shares to store your artifacts and use the Server option instead
    • Use a Windows agent

    There's really no compelling reason to use File Share artifact storage anymore; it was included in TFS 2015 for backwards compatibility with XAML builds.