Cannot add a reference of a dll developed in C# into VB 6.0

V

Vivek Sharma

Hi People,

I have been trying to add a reference of a dll created in C# to VB 6.0. It
just does not accept it. Any ideas.

Thanks
Vivek
 
J

jamie

You have to turn it into a COM object first.

Have a look at this link on CodeGuru :

http://www.codeguru.com/vb/gen/vb_general/miscellaneous/article.php/c8269/


Also make sure that you change the assembly version number to a fixed
number...

Initially it is something like
[assembly: AssemblyVersion("0.0.*")]

On each build the build number is increased and then you have to
reselect the new Dll reference from within VB.

Change the version to
[assembly: AssemblyVersion("0.0.1")]

and this problem will be gone.


Jamie
 
G

Guest

Hi Vivek,

Register for COM Interop

In the solution explorer, right on your solution and choose properties.

Under the configuration properties --> Build

set the Register for COM Interop from false to true...

Then you are ready to use in VB6.

Have fun.

Cheers.

Regards,
Chua Wen Ching
visit us at http://www.necoders.com
 
V

Vivek Sharma

Thanks. I tried building the project it gives me an error...

COM Interop registration failed. Type library exporter can not load required
library MSCOREE.TLB

Please help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top