Unit Testing issue in Visual Studio 2012

unit-testing, visual-studio-2012

Solution

After some more research I realized that I overlooked the fact that I changed the 'Output Directory' of the project containing the methods under test (which was a .dll) and was not in the same folder as my test project library, hence giving me the message:

Message: Failed to set up the execution context to run the test

So the problem was solved by making sure that the .dll containing the methods under test was in the same folder as my test project library so that at run-time my test project could find the .dll.

Problem

Whenever I try to run any of the test from my test suite in Visual Studio 2012 I get Test Failed - [test method name] Message: Failed to set up the execution context to run the test and my test is not even started (i.e. the source of the test failure is pointing at the beginning of the test method: here--> TEST_METHOD([test method name]) { } What does this message mean, what could be the cause for it to appear and what should I do for my test to run correctly?

Original source