HRESULT: 0x80131040: The located assembly's ma

2019-01-11 05:37发布

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

getting this when running nunit through ncover. Any idea?

18条回答
ら.Afraid
2楼-- · 2019-01-11 06:15

My problems solved by remove all the runtime part

<runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
查看更多
干净又极端
3楼-- · 2019-01-11 06:19

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.

查看更多
甜甜的少女心
4楼-- · 2019-01-11 06:19

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.

查看更多
Juvenile、少年°
5楼-- · 2019-01-11 06:19

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

查看更多
迷人小祖宗
6楼-- · 2019-01-11 06:21

Just deleted bin folder and project recreates all and now it is working.

查看更多
疯言疯语
7楼-- · 2019-01-11 06:21

Just Check your webconfig file and remove this code :-

<dependentAssembly>
    <assemblyIdentity name="itextsharp" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.5.13.0" newVersion="5.5.13.0" />
  </dependentAssembly>
查看更多
登录 后发表回答