tags:

views:

487

answers:

3

I recently upgraded to Windows 7 from Vista and since switching, I can no longer use nunit-gui.exe to run my tests. Every time I do, I get the following error:

System.IO.FileLoadException: Could not load life or assembly 'nunit.framework. Version=2.4.1.0 Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I've tried install versions 2.5.2 (the newest version), 2.5.1 (the version we are using in our solution), and 2.4.1 (the version it claims to be missing). I've tried having them installed one at a time and concurrently. Neither works and I always receive the same error.

Anybody have any ideas?

A: 
The located assembly's manifest definition does not match the assembly reference

I'd uninstall all versions, then install just one to C:\Program Files (x86)\NUnit. I think there's a path mishap here.

GregC
I am suspecting a version-specific reference in your dotNET project. Make it ignore version info and rebuild.
GregC
A: 

An assembly mismatch is probably occurring in your project file. You can either remove and re-add the reference to nunit, or mark the reference to ignore the version.

Ed Schwehm
A: 

Have you tried running NUnit as Administrator?

Daz Lewis
I did try this and it unfortunately didn't work either. I eventually just went back to using Resharper, which can run the tests in Visual Studio.
HawkeyeJoeS