tags:

views:

1262

answers:

1

I am trying to run the sample tests for NUnit, and I am getting an error. I have the supportedRuntime versions set to v1.0.3705 up to v2.0.50727. I have the requiredRuntime version set to v2.0.50727. Is this the wrong setting?

The following is the error that shows:

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.'

+2  A: 

I got the same problem with the CSharp examples in 2.4.8 "right out of the box" with VS2005. Here's my solution.

In nunit.exe.config, the following block is commented-out by default. Put it back in.

  <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 sounds like you did that but changed the requiredRuntime from the default of v1.0.3705 to v2.0.50727

After that, I opened the CSharp project in VS2005 and converted it. The nunit.framework references all had the icon that shows they are wrong. So I deleted the nunit.framework reference from all 4 projects: cs-failures cs-money cs-money-port cs-syntax

Then I added new references to C:\Program Files\NUnit 2.4.8\bin\nunit.framework.dll to replace them.

After that the project builds fine.

JeffH