Registering a .NET dll for use in VB6 application

La La La picture La La La · Jun 29, 2011 · Viewed 10.1k times · Source

I have a DLL I wrote in C# which I want to use in my VB6 application.

In VS2008 the project property "Register for COM interop" is checked, and when I compile the DLL and try to use it on my development machine - it runs ok.

I need to run it on a computer which does not have VS2008, so I tried to register this DLL like so:

C:\WINDOWS\system32>..\Microsoft.NET\Framework\v2.0.50727\regasm myDLL.dll /tlb: myDLL.tlb /codebase

but then when I try to run it I get this error:

Automation Error. The system cannot find the file specified.

Can anybody tell me what I'm doing wrong?

Answer

Dabblernl picture Dabblernl · Jun 29, 2011

Just like you specified the full path to regasm.exe, you need to specify the full path to your .dll ;-)