VB6 SP6, Visual Studio 2003
I've copied my .NET assembly (SRSNetBroker.DLL) into my project folder. I've
registered it for interop using RegAsm /tlb which generated a tlb file in
the local project folder.
If I compile my VB6 project to EXE, then I've got the VB6 Executable, the
.NET DLL and the TLB file all colocated in the same folder. In this sceanrio
the EXE program runs fine. However, if I run from the IDE, I get the
following error, when attempting to create an instance of the .NET class:
File or assembly name SRSNetBroker, or one of its dependencies, was not
found.
Bear in mind that this does work properly when running from compiled
executable. So how come this won't run in the IDE?
Another annoying thing I'm finding in the IDE, is that I don't get
Intellisense for the methods and parameters of the .NET class which I'm
trying to create. Although again, bear in mind that the method calls do
succeed when running from executable. This is all probably just two symptoms
of the same underlying problem. Why can't I get this .NET assembly
registered for use in the VB6 IDE?
Thanks very much for any help which you can provide.
- Joe Geretz -
Joseph Geretz - 13 Sep 2005 05:15 GMT
Now that I've redefined my class reference os Object
Private m_Repository as Object
This is working in the IDE.
I guess Interop classes are exclusively late bound objects?
I hope this won't effect performance. I need to stay within 45 - 60
milliseconds for retrieving 100K file from the server.
- Joe Geretz -
> VB6 SP6, Visual Studio 2003
>
[quoted text clipped - 24 lines]
>
> - Joe Geretz -
Robert Jordan - 13 Sep 2005 11:47 GMT
Hi Joseph,
> I've copied my .NET assembly (SRSNetBroker.DLL) into my project folder. I've
> registered it for interop using RegAsm /tlb which generated a tlb file in
[quoted text clipped - 7 lines]
> File or assembly name SRSNetBroker, or one of its dependencies, was not
> found.
The IDE has another working folder, so your dll simply cannot be found.
You must register the .NET DLL with this command line:
RegAsm /tlb /codebase SRSNetBroker.DLL
/codebase will instruct RegAsm to store the path of the DLL
in the registry.
Rob