My previous message was sent too quickly : I did not see the answers following Timothy's message.
Thanks, Gary, for the help. But I must have missed something, as I cannot get it right. I am NUnit-testing an assembly called TBordNETWork.dll. I added TBordNETWork.dll.config in the same directory, and it contains the following :
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral"/>
<bindingRedirect oldVersion="2.2.5.0" newVersion="2.2.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
I tried to run the following NAnt script :
<?xml version="1.0" encoding="utf-8"?>
<project name="N05-TableauxDeBord" default="build" basedir=".">
<target name="build" description="Compilation">
<nunit2>
<formatter type="Xml" usefile="true" extension=".xml" outputdir="./temp"/>
<test assemblyname="./tests/TBordNETWork.dll" appconfig="./tests/TBordNETWork.dll.config">
<categories>
<exclude name="Long"/>
</categories>
</test>
</nunit2>
</target>
</project>
When I was running NAnt 0.85 RC3, I had the following error :
BUILD FAILED
N:\N05-TableauxDeBord\N05-TableauxDeBord.build(4,4):
Failure executing test(s). If you assembly is not built using NUnit version 2.2.0.0, then ensure you have redirected assembly bindings. Consult the do
cumentation of the <nunit2> task for more information.
Le format du fichier 'TBordNETWork' n'est pas valide.
Then, I switched to NAnt nightly build (January 20th), and got the following display :
[nunit2] Assembly "N:\N05-TableauxDeBord\tests\TBordNETWork.dll" is using version 2.2.5.0 of the NUnit framework. If any problems arise, then eithe
r rebuild this assembly using version 2.2.0.0 of the NUnit Framework or use a binding redirect from version 2.2.5.0 to version 2.2.0.0 of the NUnit Fr
amework.
BUILD SUCCEEDED - 0 non-fatal error(s), 1 warning(s)
which is better, but when I look at my results file, I only get the following :
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="N:\N05-TableauxDeBord\tests\TBordNETWork.dll" total="0" failures="0" not-run="0" date="27/01/2006" time="10:10">
<test-suite name="N:\N05-TableauxDeBord\tests\TBordNETWork.dll" success="True" time="0" asserts="0">
<results />
</test-suite>
</test-results>
I tried to explicitly specify the .config file, by adding an attribute in the <test> element, containing appconfig="./tests/TBordNETWork.dll.config", but same problem : no tests are executed...
I even tried inverting oldVersion and newVersion in the bindingRedirect, but no success either.
If anybody sees what I have forgotten, or has a detailed list of what to do, I would be very grateful.
Jean-Philippe Gouigoux
MGDIS - Vannes
