Shubham Khandelwal
Shubham Khandelwal

Reputation: 195

VSTS error: "Publishing build artifacts failed with an error: Unable to create directory '{p}'

I have created a folder on my localhost and shared it by giving all the permissions.

Now inside the Build Definition, i have used the "Publish Artifact" and configured it as shown in the below screenshot:

enter image description here

Error: I am getting error during the build process to publish the artifact on the respective location. The error is shown in the below screenshot:

enter image description here

Any help will be greatly appreciated. Thanks in advance.

Upvotes: 5

Views: 3571

Answers (1)

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32240

The Publish Artifact build task runs on a build agent. That build agent cannot address a file share on your localhost as \\localhost\something. You should use the name of your host which is available on the network, e.g. \\mylaptop\publicshare.

In fact, if the build agent is a VSTS hosted agent, it will not be able to see your file share unless it is visible on the internet. Basically, this is what the error message is about:

If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.

Upvotes: 3

Related Questions