我在几种解决方案中使用默认管道:
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”文件。我如何排除解决方案?我能过滤“解决方案”变量吗?
发布于 2021-05-27 06:07:39
必须排除“OldPlatform.sln”文件。我如何排除解决方案?我能过滤“解决方案”变量吗?
您可以使用'-:'作为前缀,使模式为负值。例子:**\*.sln;-:**\*.Tests.lsn.
因此,您可以将变量solution设置为:
variables:
solution: '**\*.sln;-:**\OldPlatform.sln'注意:确保解决方案OldPlatform.sln的路径是正确的。
您可以查看这条线以获得更多细节。
https://stackoverflow.com/questions/67704182
复制相似问题