【发布时间】:2019-11-21 13:04:01
【问题描述】:
我试图在使用build publish 命令执行DotNetCoreCLI@2 任务时排除项目。我有一些不想运行发布的测试项目(和其他项目)。我已经尝试根据this 和this 进行文件匹配,但我无法开始工作。 projects 属性的文档没有准确说明如何编写排除项,我尝试了下面显示的不同变体。
变体 1
projects: '**/*.csproj
!**/*.Test.csproj'
变体 2
projects: '**/*.csproj
!**/*.Test.csproj'
变体 3
projects: '**/*.csproj !**/*.Test.csproj'
但是所有三个报告##[error]Project file(s) matching the specified pattern were not found.
如果我删除排除项,一切都会按预期工作,但它会构建所有项目的发布。
有人对如何写有建议吗?
【问题讨论】:
标签: azure-devops azure-pipelines azure-pipelines-build-task