I get this error when trying to run some UI tests through a ordered UI test. The error always happens after the first test from the ordered UI test is completed. I double checked and the dll file the error complained about is present at the location mentioned in the error.The error does not happen on a debug test run.
Yesterday it would run just fine. I updated to visual studio 15.8.1 today an suspect this is causing my ordered test to fail, especially because I already found some similar questions about this for other versions of vs. The solutions posted in the answers didn't work for me.
3 questions:
OK so I got to the bottom of this.
Apparently, the ordered test wouldn't run because I had a solution in my project that had some broken references. The references were used in the solution, the compiler was complaining about them, but the missing references were not breaking my code, which was strange at the least. Re-adding those references and then removing the referenced files (so the reference would get broken again), did break the code an I was unable to compile my solution.
I adjusted my code and was able to remove these references. After that, the ordered test was able to run again.
For some reason this only became a problem after updating from vs2017 15.7.6 to vs2017 15.8.1.
Hopefully this will help a few people having similar problems.