排除Azure管道中的解决方案



我正在为几个解决方案使用默认管道:

trigger:
branches:
include:
- 'develop'
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

必须排除"OldPlatform.sln"文件。如何排除解决方案?我可以过滤"解决方案"变量吗?

必须排除"OldPlatform.sln"文件。如何排除解决方案?我可以过滤"解决方案"变量吗?

您可以通过在模式前面加'-:'来使其为负数。示例:***.sln;-:***.Tests.lsn

因此,您可以将变量solution设置为:

variables:
solution: '***.sln;-:**OldPlatform.sln'

注意:请确保解决方案OldPlatform.sln的路径正确。

您可以查看此线程以了解更多详细信息。

相关内容

最新更新