I have just branched our Common Business Layer projects from the main to a new branch, and included them in a new solution. Everything compiles but when I run the unit tests I get the following error for every single test...
Unit Test Adapter threw exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
The strange thing is they run fine when I debug them. The error only happens when I run them without the debugger attached.
Failing an outright fix, can anyone tell me how to "Retrieve the LoaderExceptions property"?
I've also seen this, sometimes when the simple cleanup doesn't help, I switch the configuration to Release, clean it up, then back to Debug, clean it up and rebuild (
Try cleaning the solution and trying again.
Also try clicking on the link that appears in yellow bar of the Test Results window, this sometimes gives more information about why tests cannot be run.
My psychic debugger says that you're using 64-bit, and your test adapter is set to use 64-bit .NET framework, and devenv is set to 32-bit. Use corflags to force your test adaptor to run using the 32-bit CLR.
NOTE: Psychic debugger is not always 100% accurate, due to its use of psychic powers :)
I did run into the same errors and the cleaning did not do the job.
I resolved this one by going into the TestRunConfig file, Code Coverage Menu, and putting the right SNK file in the "Re-signing Key File" text box.
Hope this help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With