0
votes

I have developed a C# DLL that acts as a series of wrapper classes for certain methods of iTextSharps that is used by Excel VBA. On my dev machine and test machine it works, but when I tried to deploy it on user machines, after running regasm.exe for the C# DLL and tlb, I get the message "Could not load file or assembly iTextSharp.dll"

I have loaded my dll and tlb's onto the user machines and registered them using regasm.

1

1 Answers

0
votes

You will need to ship iTextSharps with your wrapper DLL. DLL means dynamic link library so when you reference a DLL from a wrapper DLL, it does just that, reference it, not include it. In C++ you can do static linking, which means that the statically linked library is fully contained in the linking binary.

Also, I believe that you need to use regsvr32 to register it for COM InterOp, and not regasm (that's the global assembly cache for use by managed DLLs and EXEs).