Reputation: 717
I’m using Microsoft Visual Developer 2010 Express, MVC 3, C#. I’ve installed ITextSharp version 5.1.3 using the Package Manager Console. When I run my program I get a message that says:
“Could not load file or assembly 'itextsharp, Version=10.0.0.0….”
I click on the itextsharp under References in my project. The Object Browser has two versions of ITextSharp. The first one is version 10.0.0.0. The second one is version 5.1.3. My guess is that the program looks at Version 10.0.0.0 first because it’s first on the list. I tried to uninstall version 10.0.0.0 using the console but it can’t be found.
Questions: Is there an iTextSharp version 10.0.0. out there? I couldn’t find one. I found a site that says that version 5.1.3 is the latest.
How can I uninstall version 10.0.0.0 if it is on my system and shouldn’t be there?
Here’s the code that cause the error:
byte[] buffer = standardPdfRenderer.Render(htmlText, pageTitle);
Upvotes: 2
Views: 881
Reputation: 901
Remove the references to iTextSharp, right click the Project on the Solution explorer and and select "Clean" and then rebuild the solution to see whether the issue goes away. Also make sure you don't have reference to the Version=10.0.0.0…. added in your Web.Config.
Upvotes: 2