预期在v2时运行v1的VSTest任务,忽略了vstestLocation

时间:2018-11-26 18:43:11

标签: visual-studio-2017 azure-devops azure-pipelines azure-pipelines-build-task

我正在尝试使用Azure Pipelines构建类库。我的azure-pipelines.yml看起来像这样:

variables:
  solution: 'MySolution.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

pool:
  vmImage: 'VS2017-Win2016'
steps: 
  - task: NuGetToolInstaller@0
  - task: NuGetCommand@2
    inputs:
      command: 'restore'
      restoreSolution: '$(solution)'
      feedsToUse: 'config'
      nugetConfigPath: 'nuget.config'

  - task: VSBuild@1
    inputs:
      solution: '$(solution)'
      platform: '$(buildPlatform)'
      configuration: '$(buildConfiguration)'

  - task: VSTest@2
    inputs:
      vstestLocation: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe'
      platform: '$(buildPlatform)'
      configuration: '$(buildConfiguration)'
      codeCoverageEnabled: true
      otherConsoleOptions: '/Framework:FrameworkCore10'

但是,该任务是从其他位置运行的,因此可以判断为似乎是Test Platform v1(TP v1):C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe。从azure-pipelines-tasks的Github问题来看,似乎他们在今年早些时候(2018年)发布了TP v2。

如何确定我实际上正在使用TP v2?

更新:我现在在管道github存储库上打开了一个问题:Microsoft/azure-pipelines-tasks#8911

0 个答案:

没有答案