Re: Adding the STAThread attribute
"Brian Genisio" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
Create an App.config for the DLL you are testing with the following nodes:
<configuration>
<configSections>
<sectionGroup name="NUnit">
<section name="TestRunner" type="
System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
// App settings
<NUnit>
<TestRunner>
<add key="ApartmentState" value="STA" />
</TestRunner>
</NUnit>
</configuration>
On Jan 23, 2008 7:36 AM, Agarwal, Prateek <[email protected]> wrote:
> 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
>
>
-------------------------------------------------------------------------
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