MSTest exception: Unit Test Adapter threw exception: Type is not resolved for member
I encountered the same problem in my unit tests. The linked article above indicates that the problem is that VSTS causes copying of some objects in the thread's CallContext.
For what it's worth, in my case the problem was that I had manually placed an object in the thread's CallContext, which caused this exception. I was able to resolve this by clearing the CallContext in my TestCleanup routine. I didn't have to change any files anywhere.
I had also run into the same issue but where I had StructureMap initialisation being performed within the constructor for a base test class.
I was able to get around the problem by moving the call from the constructor to the [TestInitialize]
method. I also ensured that the [TestCleanUp]
method disposed of the created StructureMap container. After this MSBuild (2010) would run through the tests without raising this error.
The first thing to check would be if this assembly is copied to the folder from which msbuild runs the tests. It might be the case that you have a copy in your bin/Debug folder because of some historic reasons, but the dependency is not set up properly in the project.