Selenium Toolkit 0.84 NUNit 2.5.9 Issue

Apr 1, 2011 at 1:36 PM
Edited Apr 1, 2011 at 1:38 PM

Hello I recently downloaded and installed the Selenium Toolkit 0.84.

I am using Visual Studio C# 2010 Express (.NET Framewrowk 4.0)

After following the Quick Start Guide instructions, I managed to compile a library class project into a dll.


When opening the dll from NUnit, I get a "This assembly was not built with any known testing framework" message.

Another user seemed to have a similar issue recently however on v.0.83 with NUNit 2.5.3

and an item #10532 was added on Issue tracker with a suggested solutions of copying the attached nunit addin which didn't work for me (when i copied it to C:\Program Files\NUnit 2.5.9\bin\net-2.0\addins, i still could not see it as addin


Then I tried to compile the solution with NUnit 2.5.3. The compiled dll could not be opened with a System.BadImageFormatException (You may be attempting to load an assembly built with a later version of the CLR that the version under which NUnit is currently running, 2.0.50727)


Any feedback is greatly appreciated.


Apr 1, 2011 at 9:56 PM



The previous issue was related to a mismatch between the user's version of NUnit and the version that the addin was compiled against (NUnit addins are unfortunately version specific).  The patched version of the addin for issue #10532 was for NUnit 2.5.3, so copying it into the NUnit 2.5.9 folder will not work.

For your reference, the installer also unpacks nunit version specific addins into "%Program Files%\Selenium Toolkit\bin\nunit".  You can manually copy the appropriate version to your NUnit addin folder.  The version of NUnit and the addin must match.

The BadFormatException you have referenced sounds like it might be a .NET 4.0 / 2.0 mismatch.

Can you confirm the following details:

  • Test library is compiled against .NET 4.0 (you mentioned Visual Studio 2010)
  • Your test library references:
    • %Program Files%\NUnit 2.5.9\bin\nunit.framework
    • %Program Files%\Selenium Toolkit\bin\SeleniumToolkit.dll
    • %Program Files%\Selenium Toolkit\bin\selenium-rc\ThoughtWorks.SeleniumCore.dll

I haven't done much testing with the Toolkit against .NET 4.0 framework, though everything should work fine.  In order for me to reproduce, can you provide some additional details about how you are launching your tests?  Do regular nunit tests run fine?


Apr 5, 2011 at 5:10 PM



After copying the dll in the addin folder, I got over this issue.

Regarding the BadFormatException you are right, I was playing with the assembly versions trying to compile in 2.0.


Thank you so much for the fast response.