Question

We've implemented a CollectionConstraint for Nunit in version 2.4.3 in C#. Some of our developers have already upgraded to version 2.4.7 though, and they get project creation errors when compiling. The error is

doMatch: no suitable method found to override

Any advice on how to get this constraint so it compiles version-agnostically?

Was it helpful?

Solution

Unfortunately the constraint API changed in incompatible ways for custom constraints in 2.4.6. NUnit 2.4.5 and earlier used an IConstraint interface and in 2.4.6 it was changed to a Constraint abstract base class. There was an optional Constraint base class in 2.4.5 and earlier, but the class is not consistent between versions.

Therefore there is no way to make a compiled dll work with both versions of NUnit. Everyone should upgrade to the same version of NUnit.

Sorry I'm sure this is not the answer you're looking for.

Sam

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top