VSTest例外 - VSTS CI Build

时间:2018-05-03 18:33:55

标签: c# .net-core .net-standard

我试图为vstest任务添加代码覆盖率。我要测试的dll项目是netstandard2.0,测试项目是netcoreapp2.0

我的构建定义设置为:

  1. GitVersion
  2. dotnet restore
  3. dotnet build
  4. VSTest
  5. 删除文件
  6. dotnet pack
  7. NuGet Push
  8. 发布工件
  9. 在运行VSTest Task时,它会抛出一个异常,如:

    Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Failed to initialize client proxy: could not connect to test process.
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, CancellationToken cancellationToken)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
    

    所以,我在CI定义中唯一改变的原因是 EnableCodeCoverage (设置为true)。

    我还错过了其他任何配置吗?

0 个答案:

没有答案