views:

104

answers:

1

I have an MSBuild script that uses NUnit to run tests in two assemblies. These were on .NET Framework 3.5 and it worked perfectly for a long time.

The command line was: (actual paths & names simplified)

nunit-console tests1\bin\debug\tests1.dll tests2\bin\debug\tests2.dll

I've upgraded to VS2010 and have now made the two test assemblies target .NET 4.0. I've also upgraded to NUnit 2.5.4.

I can unit test a single assembly with the following:

nunit-console tests1\bin\debug\tests1.dll /framework=4.0.30319

It works fine with either tests1.dll or tests2.dll.

If I try to specify both like before, it now fails.

nunit-console tests1\bin\debug\tests1.dll tests2\bin\debug\tests2.dll /framework=4.0.30319

The error is:

Could not load file or assembly 'tests2' or one of its dependencies. The system cannot find the file specified.

I've had a look in fuslogvw and it shows tests2 being searched for in the tests1\bin\debug and nunit-console folders. It never searches tests2\bin\debug even though it's specified on the command line.

What's up with that?

+1  A: 

Pure guesswork, but it sounds like a regression in the new version of NUnit.

You're varying two things at once - have you tried running the tests with the older version of NUnit that worked previosuly? That should give you a clue as to which way the problem lies.

Stu Mackellar
Didn't get a chance to test with 2.5.3 (which I read somewhere works with 4.0) because I was busy for a week and had to leave this be and now that I have had time to look at this again there is a new version of NUnit (2.5.5) that works.
GiddyUpHorsey