nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02641
[Bug 942609] Re: NUnit 2.6 ignores the TestRunner - STA setting
>From the release notes for 2.6:
"NUnit no longer stores settings in the test configuration file, as it
did in earlier versions. Specifically, we no longer recognize or support
OldStyleTestCases
ApartmentState
ThreadPriority
DefaultLogThreshold "
To run tests in the STA, use the RequiresSTAAttribute as appropriate. If
you want the entire assembly to run in the STA, apply it at the assembly
level.
** Changed in: nunitv2
Status: New => Invalid
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/942609
Title:
NUnit 2.6 ignores the TestRunner - STA setting
Status in NUnit V2 Test Framework:
Invalid
Bug description:
I downloaded the latest version of NUnit 2.6. I started running one of
the WPF tests, and I got an exception like
SetUp : System.ComponentModel.Composition.CompositionException : The
composition produced a single composition error. The root cause is
provided below. Review the CompositionException.Errors property for
more detailed information.
1) The calling thread must be STA, because many UI components require
this.
Resulting in: An exception occurred while trying to create an instance
of type 'xxx'
I checked the app.config setting of the NUnit test assembly file. It
contains
<NUnit>
<TestRunner>
<add key="ApartmentState" value="STA" />
<add key="ThreadPriority" value="Normal" />
</TestRunner>
</NUnit>
Still it was throwing exception. Then I downloaded the old version,
NUnit 2.5.10. And it is working fine.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/942609/+subscriptions
References