I came across this error today while moving some source around TFS. I had moved a project from from TFS Project Collection to another, done a get latest and everything built just fine. However, when trying to run unit tests after all the tests were discovered, I saw the "Exception has Been Thrown by the Target of an Invocation When Attempting to Run Unit Tests" error message in the Output window. I figured I'd try doing a get latest and running the tests on my other machine. That worked without issue. That was the first big clue; this had to do with my VS, not the source that was checked in. After trying pretty much everything in this blog post, I did a quick compare on VS versions; noticed the machine where everything was working had Visual Studio Update 3, the machine that was throwing this error did not. I went ahead and installed that. Great, that had to be it right? WRONG. That just caused me to get a different error, even more nebulous error; "Executor Process Exited". Clearly this was still environmental. Turns out the answer was going into Test Settings and changing the default processor architecture to x64. That is, Test > Test Settings > Default Processor Architecture > x64. Cue unicorns and rainbows.
comments powered by Disqus