I've recently run into this issue while building pipelines that were previously working and were unchanged. All of the data logs of old pipeline runs show that the VsTest version used for testing was 2.219.0, while the ones failing are 2.220.0. Not sure if there is anything in the new version causing things to break. The VsTest section of the yaml file of the pipelines looks like this:
- task: VSTest@2
displayName: Run VSTests
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
vsTestVersion: 'toolsInstaller'
testRunTitle: 'run unit tests'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
Has anyone ran into this lately?
I've tried changing vsTestVersion to 'latest', and it gets passed the error mentioned but it then fails to connect to a TestHost
You might be hitting this bug in VS test v 17.6: https://github.com/microsoft/vstest/issues/4516
Workaround 1 worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With