I'm getting this error trying to execute my tests using nunit2 task
Failure executing test(s). If you assembly is not built using NUnit version 2.6.0.12051, then ensure you have redirected assembly bindings
The nunit version for my test project is 2.6.2.12296.
I tested several redirect bindings on my test project config file but nothing did the trick. I know I could use EXEC
to run nunit.exe directly instead of using nunit2 task but I'd like to make this work.
UPDATE
This is my current app.config for the testing project
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d0234a77" culture="Neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.0.12051" newVersion="2.6.2.12296" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
UPDATE 2
This is the relevant part of the build file
<nunit2>
<test
assemblyname="D:\[the full path]\UnitTests.dll"
appconfig="D:\customTest.config"/>
<formatter type="Plain"/>
</nunit2>