0

I have used a third party dll(ABCpdf) in my .NET app and installed the app onto another machine. The program worked fine but then the trial expired and we purchased the third-party component and copied the new dll into the application directory. When running my app we got an error that assembly could not be loaded. I have noticed that the reference to the dll has copy local set to false so I changed it to true. Still getting the same error.

I checked and there are a number of copied of the dll on the machine - one in the folder of the installed third-party application, one in application folder of my application (copied from the installation folder) and also one in GAC. I did set copy local to true but then again, once the assembly is installed in GAC, that's the version that will always be used.

How can I resolve the issue? Would deleting dll from GAC be safe? Would it resolve my issue? Please advise

Coding Duchess
  • 6,445
  • 20
  • 113
  • 209

2 Answers2

0

Try deleting the DLL reference in your project's References and then readding it. Make sure you are adding the purchased DLL that is in your application's directory. I've had to do this plenty of times before when fighting with third-party DLLs...it usually works.

Andy
  • 616
  • 11
  • 32
0

Check the references used, etc. First of all be sure that you're compiling with the right version, with license installed. You can use this code to add the license key on runtime (to avoid future errors in your customers):

WebSupergoo.ABCpdf7.XSettings.InstallRedistributionLicense("your_serial")

AbcPDF don't need to be installed on GAC. So you can remove it from there. Then, check the 32/64 bits issue, because ABCpdf use to provide 4 dlls, 2 for each platform (ABCPDF.dll and ABCPdfCEXX.dll).

Morcilla de Arroz
  • 2,104
  • 22
  • 29