【问题标题】:Excluding projects from build in YAML configuration azure-pipelines从 YAML 配置中排除项目 azure-pipelines
【发布时间】:2020-06-04 21:15:43
【问题描述】:

我正在尝试将一些项目排除在 azure 管道 中。

我尝试了以下选项...

  • 试图仅构建 core 下的项目?
- script: dotnet build **/Core/*.csproj --configuration $(buildConfiguration)

- script: dotnet build **/Core/**/*.csproj --configuration $(buildConfiguration)

但找不到好的例子。

我要构建的项目位于不同的子文件夹下,如../../Core/Domain/Domain.csproj ../../Core/Presentation/Presentation.csproj

有什么我想念的吗,有可能吗?还是我只是做错了什么。

【问题讨论】:

    标签: azure azure-devops yaml azure-pipelines azure-pipelines-yaml


    【解决方案1】:

    您可以像这样使用 dotnetcore cli 任务:

    - task: DotNetCoreCLI@2
      inputs:
      command: 'build'
      projects: |
          **/*.csproj
          !**/*Mobile*.csproj # this ignores projects with the occurunce of Mobile anywhere in the filename
    

    【讨论】:

      猜你喜欢
      • 2021-03-22
      • 2019-09-23
      • 2020-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-21
      • 2020-09-28
      相关资源
      最近更新 更多