The attached patch code will fix the following error...

I have nant calling nunit tests as part of the build.  These unit tests are 
testing a dll that consumes a web service asynchronously.  In this dll I am 
using the synchronization object method for the asynchronous communication 
similar to this: 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcallingwebserviceasynchronously.asp


The unit tests are all failing with the following error:
"System.NotSupportedException : WaitAll for multiple handles on an STA thread 
is not supported."  

This error is thrown because the nant console project is compiled with the 
STAThread attribute.  By changing to an MTAThread model, the tests succeed.

The following changes were made for this fix:
nant-0.85-rc3\src\NAnt.Console\ConsoleStub.cs
Line 99:  [STAThread] change to [MTAThread]

James Taylor
AeneaSoft, LLC


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to