I've gotten a simple WatiN web test running on my dev environment and am trying to get it working on the TFS build server. WatiN is firing an exception:
System.Threading.ThreadStateException: The CurrentThread needs to have it's ApartmentState set to ApartmentState.STA to be able to automate Internet Explorer.
The test runner, VSTestHost supposedly uses STA threading by default. I've also tried explicitly forcing it to STA via the .testrunconfig file. Still WatiN is unhappy. I'm using Visual Studio/TFS 2008 on Windows Server 2008.
Has anyone else hit this problem and found a solution?