I'm trying to add a dll created from vb.net and i want to import it in existing vb 6 project but it gives me error "can't add reference to the specified file." . Anyone knows how can i fix this issue?
1 Answer
There are the steps to follow:
1) Create a class library in VS choose whatever language you want either Vb.NET or C#
2) Goto to Project Properties->ConfigurationProperties->build, check the Register for COM Interop checkbox. This creates the COM wrapper for your .NET assembly and hence need not use regasm.
3) Write whatever code you want, expose the classes publicly, expose the properties, functions you want publicly.
Now in your VB6 project, add the claslibrary.tlb created by the above program. Now use the classes and functions as you want.
1 Comment
SteveCav
I did the above, but my namespace and classes were not recognised. Any other tips?