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

后端 未结 19 2532
庸人自扰
庸人自扰 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:20

    In my case I got this message while debugging:

    "Error while calling service  Could not load file or assembly 'RestSharp, 
    Version=105.2.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
    The located assembly's manifest definition does not match the assembly reference.
    (Exception from HRESULT: 0x80131040)"
    

    Cause

    In my project I have had 2 internal components using the RestSharp but both component have different version of RestSharp (one with version 105.2.3.0 and the other with version 106.2.1.0).

    Solution

    Either upgrade one of the components to newer or downgrade the other. In my case it was safer for me to downgrade from 106.2.1.0 to 105.2.3.0 and than update the component in NuGet package manager. So both components has the same version.

    Rebuild and it worked with out problems.

提交回复
热议问题