The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Anshul Mittal 201 Reputation points
2021-05-28T07:33:29.313+00:00

I have a WCF service which is referencing a COM dll. I keep getting the error as follows.

Could not load file or assembly 'Interop.ABBCLIENTLICENSEPROVIDERLib, Version=1.0.0.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)

To test if it is assembly related problem or reference related problem, i created a console application and used this reference ABBCLIENTLICENSEPROVIDERLib and it worked fine. There is no error in console application.

Only the WCF application is throwing the exception.

This is high priority task and immediate help is appreciated.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,387 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,266 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. AddWebSolution 161 Reputation points
    2021-05-28T10:42:52.967+00:00

    Try this first :-
    right click on reference -> properties -> change 'Specific Version' to false.
    Also refer this :-
    the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference
    https://stackoverflow.com/questions/4187907/net-picking-wrong-referenced-assembly-version

    1 person found this answer helpful.
    0 comments No comments