I am getting this error with my new unit test:
Unable to get type MyTestProject.MyTestClass, MyTestProject. Error: Could not load type 'MyTestProject.MyTestClass' from assembly 'MyTestProject'..
I have other tests in the project that were working just fine and now they are all showing a similar error message.
If I run the test in Resharper (rather than the built in Visual Studio Test runner) then it works fine. (I would just use that, but it is slower.)
Any idea what this could mean?
I fixed this for myself by cleaning the test project and then building it.
It seems to me that the Visual Studio unit test runner is a little bit behind on the naming of your unittests. This sometimes happens when you rename a namespace or class.
This should clear the interenal cache: unload the project from your solution, run all tests, than reload the project.
Worked for me.
It's also happens when library under test is in GAC. It's offen case when you develop for SharePoint.
Remove library from GAC if you don't need it there or deploy newest version to GAC.