C# FIT fixture loading errors

Daniel Gackle <[email protected]> Wed, 03 Dec 2003 23:37:35 -0700
Newsgroups gmane.comp.programming.tools.fit.devel
Message-ID <[email protected]>
I recently encountered problems involving assembly loading and versioning
while setting up C# FIT on a new project. Has anyone else been experiencing
this?

While such issues are alas not uncommon in a .NET program (especially when
reflection is involved), I do believe that C# FIT can be improved in the way
it handles these errors. Currently, C# FIT distinguishes between two
failures to load a test fixture:

Error 1: Your fixture was not found in any of the assemblies searched.
Error 2: Your fixture was loaded, but it doesn't inherit from fit.Fixture,
so FIT can't use it.

These errors are handled well, but the Error 2 message is also displayed in
3 additional cases where it doesn't apply:

Error 3: Your fixture was compiled against a different version of FIT than
the test runner currently executing.
Error 4: Your fixture was built using a different version of the .NET
framework than the FIT assemblies you are trying to use.
Error 5: Your fixture is located in a directory from which .NET will not
allow you to use them. (FIT is finding and loading the right assembly, but
.NET is returning null when you ask it to instantiate a fixture.)

My question for Jim Shore (and anyone else who's interested): would you like
to collaborate on testing for these conditions? I think this may be more
than a trivial patch. In particular, I don't fully understand Error 5 but I
think I can reproduce one form of it.

- Daniel