I’ve been banging my head on this error for the last hour. I tried to run a set of unittests from the project we’re currently working on. The tests worked fine.
Then I took my shelveset and for some reason the tests didn’t execute anymore and all gave the error message “Unit Test Adapter threw exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.”. What???
First I tried all the default actions for trying to resolve problems with running tests:
1. Clean the solution
2. Complete rebuild of the solution
3. Refresh the Test View window.
4. Closing Visual Studio and reopening the solution
Unfortunately, none of these actions had the desired effect.
Eventually I was comparing all changes made to the code in source control. What I noticed was a difference in the solution file. The following three lines were missing:
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Solution.vsmdi
EndGlobalSection
I added these lines again and it worked
.
Those vsmdi files are driving me crazy sometimes. Haven’t used them for anything yet and got a lot problems of them when building and running tests (for a while Visual Studio kept adding them; at one point I had 20 vsmdi files in my solution directory).
But to make the story short, I can run the tests again and it had to do with something missing in the solution file.
[...] types. Retrieve the LoaderExceptions property for more information. – Part 2 In a previous post I wrote about a problem I had with running unittests, which resulted in an exception with the [...]
Pingback by Unit Test Adapter threw exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. – Part 2 « Koen about .Net — January 7, 2011 @ 09:46