NUnit-console executes in STA mode

Bug #959576 reported by Pieter Venter
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Medium
Charlie Poole

Bug Description

In NUNIT 2.6, the nunit-console executes tests in STA mode.

I created a simple test: a single class with only one test, containing:
Debug.WriteLine(System.Threading.Thread.CurrentThread.GetApartmentState());

If you run this in nunit-console, it outputs STA.
If you run it with the GUI, it outputs MTA.

According to the documentation, the default for the console should be MTA.

Related branches

Revision history for this message
Jesse Sweetland (sweetlandj) wrote :

I'm experiencing the same behavior as well and am currently working around the issue by using the /apartment=MTA flag.

Changed in nunitv2:
status: New → Confirmed
Changed in nunitv2:
status: Confirmed → Triaged
importance: Undecided → Medium
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.6.1
Changed in nunitv2:
status: Triaged → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.