Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Could not load file or assembly 'itextsharp, Version=5.5.0.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
in windows application while converting datatable to pdf format
Posted
Updated 3-Feb-16 8:07am
v2
Comments
[no name] 3-Feb-16 13:57pm    
What is your problem? pls kindly provide clear information so that we can able to help you

I've seen this issue before. Looking at the Nuget documentation [^] for iTextSharp shows several versions. If you have 2 or more projects using that package, you need to ensure they all have the same version. If they have different versions, you'll get this error.

In VS2015 Solution Explorer, right click each project that uses iTextSharp and select "Manage Nuget Packages". The window that comes up will show installed packages. Click on iTextSharp and the right pane will be "Version" with a drop down next to it. Ensure that all projects are targeting the same version of the Nuget package. Once they are all the same version, re-compile and test, the error will go away.

Hogan
 
Share this answer
 
Comments
Meenakshi Moolani 4-Feb-16 13:35pm    
i am using vs 2010 with C# in windows application. Please help in that
snorkie 4-Feb-16 14:29pm    
I don't have access to that version. Try removing all references to iTextSharp from your Solution (not just the project you're on). Then add it back in.
Check if itextsharp DLL with version '5.5.0.0' is present in your reference directory in solution explorer. If it is present then you need to Clean up your existing solution, remove its reference and then add it again, finally rebuilt it.
I think it will resolve issue
 
Share this answer
 
Comments
Meenakshi Moolani 4-Feb-16 13:37pm    
i am using vs 2010 with C# in windows application. How to clean it have seen commands but that was web related but i need windows applications.
itextSharp version is 4.1.2.0 in references folder.
But I checked my appconfig and its showing Version 5.5.0.0
<runtime>
<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyidentity name="itextsharp" publickeytoken="8354AE6D2174DDCA" culture="neutral">
<bindingredirect oldversion="0.0.0.0-5.5.0.0" newversion="">



I changed my code twice and not getting required result.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900