Azure 构建管道:构建输出在工件中的 bin 文件夹外生成 dll json pdb

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

我们正在通过构建管道部署 asp.net 核心应用程序,它创建的工件在 bin 文件夹外有许多 dll json pdb 文件。我们希望它将它移动到 bin 文件夹并删除未使用的文件。我们尝试过复制任务,但它不起作用。

我们正在使用 .Net Core 命令通过传递参数来发布项目:—configuration $(BuildConfiguration) —output $(build.artifactstagingdirectory)

如何定义复制任务以将所有未使用的二进制文件移动到 bin 文件夹。

谢谢。

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

要使用复制任务,我们应该使用 predefined variables System.DefaultWorkingDirectory 作为 Source Folder 而不是直接通过 Browse Source Folder 选择它:

那是因为 在我们构建管道的代理上生成文件而不是在 repo