Re: Adding the STAThread attribute

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
Yes, NUnit takes care of running your tests. 
 
If you need to run certain tests in a STA, you have to create a config file
for your tests and specify the threading model there. See the Configuration
Files section of the docs for how to create a config. See the config file
for the NUnit tests (not for NUnit itself) for the format of the entry used
to specify the threading model.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Agarwal,
Prateek
Sent: Wednesday, January 23, 2008 12:36 PM
To: [email protected]
Subject: [Nunit-users] Adding the STAThread attribute



Hi,

 

I am running a suite of test cases through the Nunit GUI by loading the
appropriate dll. The only thing is that I do not really have a Main() method
in that project. Is it that when I run test cases this way, the Framework
takes care of loading the application? Also, I have been getting the
ThreadStateException and so wanted to add the STAThread attribute to the
Main() method (but am not able to since I don't have a Main() method).
Anything I can do?

 

The version I am using is 2.2.8

 

Hope I have been paint a clear picture. Thanks in advance.

 

Prateek Agarwal

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.