Some notes on software development... RSS 2.0
# Wednesday, 16 September 2009

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:

image

Re-opening the solution and running the test again will now work without the exception.

Links:
Running MSTest In An MTA

Wednesday, 16 September 2009 07:16:50 (GMT Standard Time, UTC+00:00)  #    -
Testing
Navigation

Sign In
Extras
Statistics
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Hadrian Phillips

All Content © 2017, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)