In 2.6, how can I set 'ApartmentState'?

Asked by Chris Shaw

In the documentation for 2.6, I found the following:

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

Is NUnit now MTA only, or is there another way to run my tests in a STA environment? My tests all fail with an InvalidOperationException: "The calling thread must be STA, because many UI components require this."

Question information

Language:
English Edit question
Status:
Solved
For:
NUnit V2 Edit question
Assignee:
No assignee Edit question
Solved by:
Chris Shaw
Solved:
Last query:
Last reply:
Revision history for this message
Chris Shaw (cshaw-alionscience) said :
#1

Never mind -- I found the RequiresSTA attribute.

(Might I suggest a search functionality on the nunit.org docs page?)

Thanks,
--Chris