I have a DLL that I want to use in C # projects as well as in Excel VBA. I used regasm.exe to register the DLL and create the TLB. Now I was able to reference it in VBA. My problem is that I need my C # applications still not able to find the DLL. I have to add either a copy of the DLL or a .config file to the folder of each C # application for them to work. I see the link in Visual Studio under COM, but I get an error when I try to use this link (something related to Active-X, I can see if this is important).
So I tried using gacutil.exe (unregistered first with regasm.exe) and registered my DLL in the GAC. Now I don't need a copy or .config, my C # applications are working again. Excel VBA still needs to register with regasm.exe, although I cannot add refrence after using gacutil.exe.
Here's my question: how do you register a DLL when you want to use it for C # and Excel VBA applications? Is it possible to use both regasm and gacutil without any problems?
source
share