 <blockquote> <p>The following code</p> </blockquote> <p>is missing. </p> <p>Anyway when I was using WatiN + Nunit + MSVS, I had this configuration in my testing project:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup name="NUnit"&gt; &lt;section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;NUnit&gt; &lt;TestRunner&gt; &lt;!-- Valid values are STA,MTA. Others ignored. --&gt; &lt;add key="ApartmentState" value="STA" /&gt; &lt;/TestRunner&gt; &lt;/NUnit&gt; &lt;/configuration&gt; </code></pre>