I have a DLL that I want to use in C# projects as well as Excel VBA. I used regasm.exe to register the DLL and create a TLB . I was now able to reference it in VBA. My problem is, that I would need to my C# apps still can't find the DLL. I would have to add either a copy of the DLL or a .config - file in the folder of each C# app for them to work. I can see the reference in Visual Studio under COM, but get an error when trying to use that reference (something Active-X related, I can look it up if it's important).
So I tried using gacutil.exe (unregistered first with regasm.exe) and registered my DLL in GAC. Now I don't need the copy or .config, my C# apps work again. Excel VBA still needs the registration with regasm.exe though, I can't add a refrence after only using gacutil.exe.
Here my question: How do you register a DLL when you want to use it for C# apps AND Excel VBA? Is it possible to use both regasm and gacutil without having any problems?