Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7045409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:31:38+00:00 2026-05-28T02:31:38+00:00

I am exploring WatIN automation framework driven by NUnit and Nant. I have Apartmentstate

  • 0

I am exploring WatIN automation framework driven by NUnit and Nant. I have Apartmentstate set in App.config

<NUnit>
    <TestRunner>
      <!-- WatiN can only host IE in STA mode -->
      <add key="ApartmentState" value="STA"/>
    </TestRunner>
</NUnit>

I have also set [TestFixture, RequiresSTA] in test class. This works perfectly fine when i use nunit-console testrunner or Nunit GUI runner.

Using Nunit2 runner in NAnt throws this exception

[nunit2] : [DEBUG] The CurrentThread needs to have it’s ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer

How do I workaround this issue?

Thanks
Jenga

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:31:38+00:00Added an answer on May 28, 2026 at 2:31 am

    I had a similar problem. I was able to fix it by adding the /nothread arg when calling nunit-console.exe from my nant target.

    Example:

    <exec verbose="true" 
        workingdir="${project::get-base-directory()}\build"
        program="tools\nunit\nunit-console.exe" basedir="${project::get-base-directory()}">
    
        <arg value="${ua-testproject.name}" />
        <arg value="/nothread" />
        <arg value="/xml:${ua-tests.report}" />
    </exec>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have listview app exploring cities each row point to diffrent city , in
I'm currently exploring django forms and have a issue I hope someone can help
I'm exploring backbone.js framework and I'm interested how can I fetch collection's model from
I've been exploring different strategies for running integration tests within some Nant build scripts.
I have recently started exploring Maven, but I feel a bit overwhelmed of all
I'm exploring the possibility of running a Java app on a machine with very
Exploring around S3's UI, it seems they only enjoy file uploads from my local
I have just started exploring TWILL . Twill is an amazing scripting language for
I am exploring android and developement and I found one problem. My app UI
Recently I have been exploring using the fancy new dynamic keyword introduced in C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.