VSTS 构建复制文件任务将完整路径复制到目标
VSTS build Copy Files task copies full path to destination
我在 VSTS 构建中使用 复制文件 任务将 VS 项目(bin\Release
文件夹)的结果复制到暂存目录中的子文件夹.
我期望的是 bin
文件夹中的内容应该在 staging\bin
文件夹中:
drop\bin\
而是将完整路径复制到目的地。所以我的二进制文件都在
drop\bin\src\MySolution\MyProject\bin\Release\
有没有办法只将我的发布文件夹中的文件复制到暂存文件夹而不复制完整路径?
原来我只需要将我的源目录更改为二进制文件所在的文件夹。
NOTE This only works because I know exactly where the desired files are. If you find this and you're trying to copy from multiple directories, you have a couple options:
- Multiple Copy Files tasks
- Just deal with the extra directories.
值得一提的是,如果您使用 BuildConfiguration 变量,它会有所帮助,因此当您使用不同的构建配置时它不会中断:
高级 => 检查 YAML 文件中的 Flatten Folders
或 flattenFolders: true
。
我猜这个选项当时不存在。
我在 VSTS 构建中使用 复制文件 任务将 VS 项目(bin\Release
文件夹)的结果复制到暂存目录中的子文件夹.
我期望的是 bin
文件夹中的内容应该在 staging\bin
文件夹中:
drop\bin\
而是将完整路径复制到目的地。所以我的二进制文件都在
drop\bin\src\MySolution\MyProject\bin\Release\
有没有办法只将我的发布文件夹中的文件复制到暂存文件夹而不复制完整路径?
原来我只需要将我的源目录更改为二进制文件所在的文件夹。
NOTE This only works because I know exactly where the desired files are. If you find this and you're trying to copy from multiple directories, you have a couple options:
- Multiple Copy Files tasks
- Just deal with the extra directories.
值得一提的是,如果您使用 BuildConfiguration 变量,它会有所帮助,因此当您使用不同的构建配置时它不会中断:
高级 => 检查 YAML 文件中的 Flatten Folders
或 flattenFolders: true
。
我猜这个选项当时不存在。