Lesstep
Azure Pipelines · Artifacts · Checked November 6, 2026

Azure Pipelines: "Not found PathtoPublish": the publish step points at a path that is not there

The Publish build artifacts task (PublishBuildArtifacts@1) takes one folder or one file in PathtoPublish and checks that it exists before it uploads anything. When it does not, the task fails and prints the path it was given, after variables were expanded. That path usually tells you which case it is: a variable name the pipeline does not know (it stays as text), a wildcard (the input takes none), or a folder the build never wrote to (a Stack Overflow question on this message has been seen over 58,000 times).

When the publish step is part of a pull request's build validation, the required build stays failed until a run publishes: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in your IDE, and with Pro runs a failed build policy again once the pipeline is fixed. Get it on JetBrains Marketplace

What it looks like

Read the path in the message

List the folder before the publish step

The build wrote somewhere else

Pipeline artifacts instead of build artifacts

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft, GitHub, Inc. or JetBrains.

More: no template, or no parameters file · no zip where the deploy task looks · a Windows-only task on a Linux or macOS agent · a resource authorization issue · 日本語