Yesterday I was asked to take a look at one our clients Azure DevOps pipeline that stopped working all of a sudden. No changes had been made recently but from nowhere the VSTest pipeline task throws this error (followed by a bunch of other build errors).
The Pipeline Error:
##[error]Testhost process exited with error: Cannot use file stream for [D:\a\1\s\..\netcoreapp3.0\testhost.deps.json]: No such file or directory
The VSTest default configuration:
When you create a new Visual Studio Test task, you will get these default configurations:
However our projects dll file is *.Tests.dll with uppercase T and as mentioned VSTest 17.3.0 has now somehow become case-sensitive so this filter will not work.
So all I had to do was change my path filters so they use the same casing and this solved the problem:
As someone mentioned in the issue on GitHub, this is probably a bug in VSTest 17.3.0 (or the default configurations will need to change) that will probably be addressed, at the time of this blogpost 17.3.0 was released 8 days ago so it will probably be resolved soon (I guess you could also specify a specific version (17.2.0) for VSTest task until this is fixed).
Until this gets resolved hopefully this may help someone who gets stuck on the same issue.
Cheers friends! ❤️