← Back to team overview

nunit-core team mailing list archive

[Bug 582051] Re: 2.5.5 cannot find fixture for framework 4.0

 

Hi
I am having the same problem with VS 2010, .NET 4.0, NUnit 2.5.5.10112 on a 64 bit system.

I am dealing with 3 projects, one of them being a trivial 1 TestFixture
class with 1 Test method and 1 Setup method and nothing else.

Initially, using a fairly large project that was originally developed on
VS2008 with .NET 3.5 and moved to VS2010 with .NET 4.0, I got a number
of cases in which, from time to time, launching nunit-console from VS
would not execute any test - it would just report 0 test executed.
Relaunching it would cause it to actually execute the tests. I spent a
fair amount of time trying to figure out what would cause it, but it was
transient and I could not find anything more precise.

I exited VS 2010, loaded another project - and tried to run nunit. The project had the same type of setting in terms of framework, etc..., and the same level of complexity (a few hundred test fixture classes, a total of a couple of thousand tests). Initially, I got the same issue (no error reported, but 0 test reported executed) - after the first try, the second one did execute the tests, and that was the case until I rebuilt.
>From that point on, I systematically got "unable to locate fixture".

I ended up exiting VS 2010 again, building the simple project described
above, and now I systematically get "unable to locate fixture".

Using the GUI tool properly configured to handle .net 4.0, I get a
message telling me that it could not find any test. And that is
systematic now.

I started on a second 64 bit system, using the small project again, and
managed to go through the same cycle: not working, working, not working
anymore.

This is very puzzling but not inconsistent with what was described
earlier.

Nunit is a very good tool I have been using for a while and I rely on immensily (thanks for all the work). 
I hope the source of this can be identified, and a work-around provided.

Thanks!

-- 
2.5.5 cannot find fixture for framework 4.0
https://bugs.launchpad.net/bugs/582051
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: New

Bug description:
Just downloaded v2.5.5.10112 of Nunit. In a new VS2010 project I am unable to get either the nunit.exe or nunit-console.exe programs to recognize my test cases. The programs run, and after a while tell me 'can't find test fixture' in the case of nunit-console, and a similar message with nunit. The test class has TestFixture applied, and is public, the method has TestCase applied (started as Test) and is also public. The project has references to the 2.5.5 versions of nunit.core.dll and nunit.framework.dll.

I changed the target runtime to 3.5, recompiled, and it has picked up on the test cases immediately (I'm still using the 2.5.5 dlls).

Possibly of interest, the gui really wants to use version 2 of the framework. I tried requesting version 4 from the menu but after a while, it fails to find the test and reverts back to version 2 of the framework.

I'm using VS2010 (evaluation edition at the moment), on 64 bit Vista.

I've tried to find a solution elsewhere, and full apologies in advance if it's a school-boy error on my part.

Thanks for your time on the project.





References