When my automated build runs on the build server all of the tests pass.
If I run one of the failed tests by right clicking inside the test (Visual Studio 2010) and clicking "Runs Tests" it fails.
If I run the same test using the little circle in the left gutter from ReSharper it passes.
This leads me to believe it has something to do with the Host type? But I am not sure.
The failure in the test has to do with a Method Not Found exception. The class under test, ClassA, inherits from ClassB (from a referenced assembly). Class B has a method on it that is being called in the code, and when the tests fail they do so because the method cannot be found.
Does anyone have any ideas about what might be causing this or how I can fix it?
EDIT: As it turns out MSTest is not copying the right version of my assembly to the Out folder, which would make sense why it can't find the method. The correct version is referenced in the Test project, not sure why it is hanging on to the old version, or where it's getting it from.
Solution I cheated a little. I didn't want to waste the time figuring out where my DLL was being cached. Using Windows Explorer I searched my solution folder and all subfolders for the assembly, changed the results to Details view and added File Version to the result columns.
I deleted all of the old versions of the files and re-ran the tests and now they pass.
Honestly the best way to learn how a runtime works is to learn how to debug it at the lowest levels. Read every single article here: Tess Ferrandez on MSDN[^]. Read if from start to end (well, actually end to start) and you should have really good in-depth knowledge (granted, reading and digesting that whole blog will probably take a few months). Real-world experience/stories sticks a lot better than raw theory (at least in my experience).
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb]