If you get a NotSupportedException of ‘WaitAll for multiple handles on a STA thread is not supported when using multi-threading’ in an MSTest project your need to modify the test project from being STA to MTA.
For Visual Studio 2008:
Open up the LocalTestRun.testrunconfig file for the project and add <ExecutionThread apartmentState=”1” /> after the <Description> tag:
Re-opening the solution and running the test again will now work without the exception.
Running MSTest In An MTA