← Back to team overview

nunit-core team mailing list archive

[Bug 942609] [NEW] NUnit 2.6 ignores the TestRunner - STA setting

 

Public bug reported:

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.

** Affects: nunitv2
     Importance: Undecided
         Status: New

-- 
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:
  New

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


Follow ups

References