我的天蓝色devops测试管道遇到了一些麻烦。我正在使用xunit测试,并且每个测试项目都可以正确运行,并且可以查看测试结果,但是由于以下错误,管道仍然会失败
##[error]Testhost process exited with error: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
##[error]. Please check the diagnostic logs for more information.
就像这里建议的一样,我为添加了一个额外的过滤器,testhost.dll
因此我的yaml代码段如下所示:
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test.dll
!**\*TestAdapter.dll
!**\obj\**
!**\testhost.dll
!*testhost.dll
searchFolder: '$(System.DefaultWorkingDirectory)'
diagnosticsEnabled: true
codeCoverageEnabled: true
但是,错误仍然会发生,并且我的构建被标记为失败。我怎样才能解决这个问题?
希望此GitHub问题能有所帮助。
尝试的事情:
希望这可以帮助!
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句