I also came across the same problem, but for Selenium tests that use the NUnit adapter to find them in the test explorer window. In the test conductor, he threw the same error "An exception was chosen as the target of the call." I thought that there might be a problem with the NUnit Adapter extension, which is responsible for opening tests, but this is not so, since another project (solution) that was not under TFS was able to detect all the tests.
An internal exception would give a better idea of ββthe problem, but I just couldn't figure it out. So we tried different options and tried the same solution on different machines, which could easily detect and run tests.
After all my analyzes and google, I found out that the problem is with TFS, somewhere either with the display, or with something else, something went wrong for this particular machine.
This blog was really helpful.
What worked for me : I tried the different options mentioned above except for removing VS (2012). However, it worked for me to create a new TFS workspace and get the project in a new new place in a new workspace. In doing so, I also reset all user preferences, the third option mentioned in the blog.
Rahul R.
source share