Re: How do addon writers deal with NUnit versions?
"Charlie Poole" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <001d01c8c4d6$674500c0$4065a8c0@ferrari> |
Hi Stefan, > > Of course, this makes sense from the point of view of .NET, since > > XMLUnit might be using some method that exists in > > 2.4.6 but not 2.4.7. That's not very likely, so you could use a > > binding redirect at the user test level to force it to work. > > I thought that would work, but it doesn't seem to be the case > - or I may be using it the wrong way. > > In my little test I placed a > > <configuration> > <runtime> > <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> > <dependentAssemby> > <assemblyIdentity name="nunit.framework" > culture="neutral" publicKeyToken="96d09a1eb7f44a77"/> > <bindingRedirect oldVersion="2.4.6.0" newVersion="2.4.7.0"/> > </dependentAssemby> > </assemblyBinding> > </runtime> > </configuration> I believe that should work, provided you put it in the right place. > into a .config filed named just like my tests DLL, and this > doesn't work. Neither does placing it into NUnit.exe.config. Assuming you are actually loading the dll from NUnit, and not an NUnit or VS project file, this should work. The xxx.dll.config file should be in the same directory as xxx.dll. > "Doesn't work" here means I still get the same exception. If none of the above helps, I'd examine the fusion log next. Charlie > >> > 2) Use or modify my nant script > (http://nunit.org/?p=addins) to do > >> > your build. > >> > >> I've seen that, thanks. > > > > Of course, it's not relevant here since you are not doing an addin. > > It may still come in handy if I ever want to release separate > DLLs built against different versions of NUnit or the .NET > framework, so thanks. > > > In the meantime, it seems to me that the ideal solution > would be for > > XMLUnit to be a library of constraints that can be used through the > > normal NUnit Assert.That() syntax. > > Fully agreed. This is what I advise people to do in Java > land who want to use XMLUnit with TestNG as well. People > seem to want the convenience method like XMLAssert.AreEqual() > rather than Assert.That(XML.AreEqual(...)), still. As long > as I'm not prepared to backwards compatibility I don't have a > choice anyway. > > > Other than the fact that the user would have to modify the test > > config, do you see any problems with use of a binding redirect? > > If I can get it to work, I don't have any problem with it at all. > > Stefan > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft Defy all > challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Nunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/