How to resolve "The located assembly's manifest definition does not match the assembly reference." error?


I downloaded source code for pdfiumviewer from git hub. I made changes to one of the projects in that solution.Then I added that project to my application and added reference of that project to one my application's project.I had to uncheck the Signing option for the PDfiumViewer project, as some of the dll in that project are unsigned.I am able to build the application successfully.But at run time when I create an object of one of the class of PDfiumviewer project.It gives me the following error:

Could not load file or assembly 'PdfiumViewer, Version=, 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)

The version number of the assembly is correct.So, why am I getting this error?

asked on Stack Overflow Feb 15, 2017 by V K • edited Feb 15, 2017 by Ped7g

2 Answers


The problem was that I had added reference of old unmodifed PdfiumViewer dll to another project.Hence, there was conflict between the two dlls (old and customized) at runtime.I removed the old dll reference and it worked.

answered on Stack Overflow Feb 16, 2017 by V K

Ive also encountered this issue, my scenario was thou that I had to add a reference from another solution into my project removing the reference was not an option - what worked for me was reinstall SQLclient from nuget package managerer on both solution. Hopes it helo someone else

answered on Stack Overflow Feb 18, 2020 by user12897148

User contributions licensed under CC BY-SA 3.0