.NET 4, nunit failure

I'm able to run tests successfully on my workstation via nunit 2.4.8 and visual studio 2010/.net 4 but the TC build fails with the following:

NUnit error running tests in 'E:\TeamCity\buildAgent\work\6c348c16e137f6f7\UnitTests\bin\Debug\UnitTests.dll' assebmly
System.BadImageFormatException: Could not load file or assembly 'E:\TeamCity\buildAgent\work\6c348c16e137f6f7\UnitTests\bin\Debug\UnitTests.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'E:\TeamCity\buildAgent\work\6c348c16e137f6f7\UnitTests\bin\Debug\UnitTests.dll'

nant test task:

<target name="tests">
  <nunit2 haltonfailure="false" failonerror="false" verbose="true">
   <formatter type="Xml" extension=".xml" outputdir="${testoutput}" usefile="true" />
   <test assemblyname="${testdir}/${testname}" />
  </nunit2>
</target>

2 comments
Comment actions Permalink

Thinking this might be a version support issue with nant. I'm running NAnt-0.85

0
Comment actions Permalink

Yep, upgrading to nant .91 fixed it.

0

Please sign in to leave a comment.