HRESULT: 0x80131040: The located assembly's manifest definition does not match the assembly reference
The located assembly's manifest definition does not match the assembly reference
getting this when running nunit through ncover. Any idea?
Solution 1:
This is a mismatch between assemblies: a DLL referenced from an assembly doesn't have a method signature that's expected.
Clean the solution, rebuild everything, and try again.
Also, be careful if this is a reference to something that's in the GAC; it could be that something somewhere is pointing to an incorrect version. Make sure (through the Properties of each reference) that the correct version is chosen or that Specific Version is set false.
Solution 2:
I recently had this issue and I ran 'depends.exe' on the dll in question. It showed me that the dll was compiled in x86 while some of the dependencys were compiled in x64.
If you are still having troubles I would recommend using depends.exe.
Solution 3:
In my case for a wcf rest services project I had to add a runtime section to the web.config where there the requested dll was:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
.
.
.
<runtime>