HRESULT: 0x80131040: The located assembly's manifest definition does not match the assembly reference

后端 未结 19 2299
庸人自扰
庸人自扰 2020-12-02 19:27

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

getting this when running nunit through ncover. Any idea?

相关标签:
19条回答
  • 2020-12-02 20:11

    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.

    0 讨论(0)
  • 2020-12-02 20:12

    I ran into similar problems when accessing the project files from different computers via a shared folder. In my case clean + reabuild did not help. Had to delete the bin and objects folders from the output directory.

    0 讨论(0)
  • 2020-12-02 20:12

    I ran into this issue in a web api project.

    Api project was using a nuget package of a library with version 3. And one of the referenced assemblies say X was using older version of the same nuget package with version 2.

    Whenever referenced assembly is built or any other project referencing X is rebuilt, api project's assemblies gets updated with lower version. And got this assembly reference error.

    Rebuild works but in my case I wanted a long term solution.

    I made the assemblies reference same version of nuget package.

    0 讨论(0)
  • 2020-12-02 20:13

    I had the issue where it wouldn't find the PayPal assembly and it was because I had named my solution PayPal. I'm sure this won't be the answer for anyone but thought I'd share it anyway: C# ASP.NET MVC PayPal not finding assembly

    0 讨论(0)
  • 2020-12-02 20:14

    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.

    0 讨论(0)
  • 2020-12-02 20:18

    Just delete the bin folder and then then the project recreates all again and it will be working now .

    0 讨论(0)
提交回复
热议问题