Search code examples
azure-devopsazure-pipelinesartifactsazure-artifacts

Azure build pipeline: build output generates dll json pdb outside the bin folder in artifacts


We are deploying asp.net core application through build pipeline and artifacts it creates have many dll json pdb files outside the bin folder. We want it move it to bin folder and remove unused files. We have tried copy task but its not working.

We are using .Net Core command to publish the project by passing arguments: —configuration $(BuildConfiguration) —output $(build.artifactstagingdirectory)

How do I define copy task to move all the unused and binary files to bin folder.

Thanks.


Solution

  • Azure build pipeline: build output generates dll json pdb outside the bin folder in artifacts

    To use the copy task, we should use the predefined variables System.DefaultWorkingDirectory as Source Folder instead of selecting it directly by the Browse Source Folder:

    enter image description here

    That because the generates files on the agent where we build the pipeline not in the repo.