Why does trying to unit test with two .NET 4.0 assemblies under NUnit 2.5.4 fail?
Posted
by GiddyUpHorsey
on Stack Overflow
See other posts from Stack Overflow
or by GiddyUpHorsey
Published on 2010-04-17T18:42:30Z
Indexed on
2010/04/17
19:03 UTC
Read the original article
Hit count: 407
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\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?
© Stack Overflow or respective owner