Getting version 2.0 is not a compatible version when running NUnit
I am trying to run sample tests for NUnit and I am getting an error. I have versions
installed for v1.0.3705 to v2.0.50727. My version is
set to v2.0.50727. Is this the wrong setting?
Below is the error that shows:
The metadata file 'c: \ Program Files \ NUnit 2.4.8 \ bin \ nunit.framework.dll' could not be opened - "Version 2.0 is not a compatible version."
I have the same problem with CSharp examples in 2.4.8 out of the box with VS2005. Here's my solution.
The following block is blocked by default in the nunit.exe.config file. Take it back.
<startup> <supportedRuntime version="v2.0.50727" /> <supportedRuntime version="v2.0.50215" /> <supportedRuntime version="v2.0.40607" /> <supportedRuntime version="v1.1.4322" /> <supportedRuntime version="v1.0.3705" /> <requiredRuntime version="v1.0.3705" /> </startup>
It looks like you did it, but changed the required execution time from the default v1.0.3705 to v2.0.50727
After that, I opened the CSharp project in VS2005 and converted it. The nunit.framework links have an icon that shows they are wrong. So I removed the nunit.framework link from all 4 projects: cs-dips cs-money cs-money-port cs-syntax
Then I added new links to C: \ Program Files \ NUnit 2.4.8 \ bin \ nunit.framework.dll to replace them.
After that the project builds perfectly.
source to share