Skip to content
Latchkey

Azure Pipelines PublishPipelineArtifact / DownloadPipelineArtifact Name Mismatch

A DownloadPipelineArtifact@2 could not find the artifact it asked for. The artifact name does not match what PublishPipelineArtifact@1 produced, or a cross-stage download lacks a dependency on the stage that published it.

What this error means

The download step fails with "artifact not found" (or downloads nothing), so the consuming step has no files. The publish step earlier in the run succeeded - the names or stage wiring just do not line up.

Azure DevOps
##[error]Artifact 'web-dist' was not found for the pipeline run.
Published artifacts: 'drop'.

Common causes

Download name differs from the published name

The artifact input on download must exactly match the artifact used on publish. A mismatch (web-dist vs drop) returns nothing.

Cross-stage download without the dependency

Downloading an artifact published in another stage requires the consuming stage to dependsOn the producing stage, or the artifact is not visible yet.

How to fix it

Match published and downloaded artifact names

Use the same artifact name on both ends.

azure-pipelines.yml
# producer
- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Build.ArtifactStagingDirectory)'
    artifact: 'web-dist'
# consumer
- task: DownloadPipelineArtifact@2
  inputs:
    artifact: 'web-dist'
    path: '$(Pipeline.Workspace)/web-dist'

Add the stage dependency for cross-stage downloads

Make the consuming stage depend on the producing stage so the artifact is available.

azure-pipelines.yml
- stage: Deploy
  dependsOn: Build
  jobs:
    - job: pull
      steps:
        - download: current
          artifact: web-dist

How to prevent it

  • Keep one canonical artifact name and reference it on both publish and download.
  • Add dependsOn whenever a stage consumes another stage’s artifact.
  • Use the download: shortcut with current to pull this run’s artifacts.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →