John Lam 1997 — 2026

Framework 1.1 and NUnit gotcha

If you’re using V1.1.4322 of the frameworks, and you’re writing unit tests using NUnit 2.0, you’ll need to add the following to both the nunit-console.exe.config and nunit-gui.exe.config files:

<startup>
  <supportedRuntime version="v1.1.4322" />
</startup>

NUnit 2.0 is compiled against V1.0 of the frameworks, and at some point you’ll wind up trying to load both V1.0 and V1.1 versions of mscorlib.dll, which is prohibited by the CLR. By adding this to your application’s configuration files, you’ll force the NUnit test harness code to run under V1.1 of the frameworks, thereby solving your problem without forcing you to recompile the NUnit binaries.

4 archived reader comments

OmegaSupreme (2003-07-20)

I suffered from this problem a few weeks back, I was totally puzzled. Thanks for the tip :D

mr280 (2003-08-06)

Geez, you think that they could put this in the docs?

no one (2003-09-18)

Hey, isn’t this a symptom of dll, I mean, assembly hell?

Rich Joubert (2003-10-02)

Our development group has been experiencing problems running NUnit tests through VS.NET 2003. I ran across this post and tried adding to the NUnit config files, but it did not work for me. Exactly where in the config file should we add this tag? I tried a few different locations within the file, but it complains about the “#” symbol in the tag.