'Error in release pipeline : Container path not found
I searched in several forums and everyone suggested to add below line in the yaml.
- task: PublishBuildArtifacts@1
In my case, i am using the classic editor as it is my first time learning Devops. The publish artifact task was already added but I still see the error, "Container path not found". Can someone let me know what am i missing here?
My release pipeline is looking for "D:\a\r1\a.." path whereas artifacts were copied to "D:\a\1\a.." in the build pipeline.
Solution 1:[1]
My release pipeline is looking for "D:\a\r1\a.." path whereas artifacts were copied to "D:\a\1\a.." in the build pipeline.
The release pipeline will download your build artifact to the folder "D:\a\r1\a". You can find this in your release logs: I can reproduce your issue if the Working Directory of the command line task is incorrect. Please make sure the Working Directory of your task is exist.
Update: For example: I want to run test.exe in my folder:
The working directory should be $(System.DefaultWorkingDirectory)/_Jan-CI/drop/test
here.
Solution 2:[2]
Sorry can't comment on Walter's answer atm but just want to add to Walter's answer. Based on the error
Container path not found: 'D:\a\r1\a_MyFirstPipeline\drop\bin\Release\TestDevOps.exe' ` $(System.DefaultWorkingDirectory)/_MyFirstPipeline/drop/bin/Release/TestDevOps.exe``
It seems like you might have a typo. There is an extra 'a' before '_MyFirstPipeline' in your path compared to the 2nd one
Also, as per Walters comments, if you provide your code then it'll help people diagnose and help more.
I'm going to assume that if your pipeline is looking for your artifact in a different place than where your artifact is stored then thats the error and the cause could be a typo. Check your code that is publishing the artifact and what location it is using and the code where you're trying to fetch it from matches.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Douglas Young |