views:

107

answers:

1

Ok, so since going to version 2.5 Nunit is causing me all sorts of problems because they introduced the static class Is into the nunit.framework namespace.

It would be well and good if Rhino.Mocks and a few other frameworks did not also make use of an Is static class. So now if I upgrade to 2.5 most of my code that uses rhino mocks constraints will not compile.

Is there a way to configure visual studio/the c# compiler on the project level to know that when I say Is I mean the Rhino Mocks namespace?

PS. Open Source authors, I know you love da fluent interfaces but stop using such common words when they're going to clash with other frameworks! How about some closures with lambdas you can still do something like myVar.Should(be=>be.True())?

A: 

Try using the using directive.

McWafflestix
No good, I already have code using Rhino Mocks Is. NUnit though added the Is class to its base directory. I would have to go through my codebase adding an alias before I have used the rhino mocks Is. Might as well write my own extension at that point.
George Mauer
I know this sounds silly, but have you tried just doing a global search and replace to replace it with the fully qualified name?
McWafflestix
Well..yes that would work, but then I have to fully qualified Rhino Mocks Is classes (which I use a lot) just so that Nunit can have its "Is" class (which I don't use at all)...ugly
George Mauer