1
votes

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?

4
The assumptions below (that there was an assembly mismatch in the project file) was true, but removing and re-adding the reference did not fix the issue. Also, SpecificVersion was already set to false.Joel Shea

4 Answers

1
votes

I realize this post is fairly old, however if you're running a 64-bit version of Windows 7, and your test assembly is built for x86, you will need to run the x86 specific version of the NUnit gui.

It should be in the same folder nunit is installed to and is called nunit-x86.exe

0
votes
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.

0
votes

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.

0
votes

Have you tried running NUnit as Administrator?