How to create a .Dll file in vb.net?

anand

Regular
Joined
Jan 29, 2003
Messages
76
Location
chicago
Hi i am creating a .dll file in vb.net like this

Namespace class1
Public Class Class1
Public eno As Integer
Public Sub details()
System.Diagnostics.Debug.WriteLine("This is sub1")
End Sub
End Class
End Namespace




c:\>vbc /t:library class1.vb

while creating the .dll using commadprompt its giving an error
pls give me a idea whats my mistake and how to create a .dll in vb.net
error:the file class.vb not found

Thanks
Satya
 
You most likely need to give it the full path to the .vb file.

Code:
C:\>vbc /t:library C:\My Documents\Projects\MyDLL\Class1.vb

Or wherever it is on your computer.
 
hi lot of thanks
now i created a .dll in vb.net ..i want to use that in visual basic??while referencing that .dll in vb its giving an error u cant reference that dll....pls let me know what i have to do ............

pls tell me how to give a string name to my .dll

Thank you
Satya
 
Do you mean VB.NET, or VB6? If you mean VB6, you can't reference
it there without first compiling it as a COM DLL (look in the MSDN for
info on that). If you mean VB.NET, then you'll need to give us more
on what you're doing and what you're trying to do.
 
Hey
I want to use my .dll file in visual basic 6.0..i want to reference the dll which was created in vb.net in visual biasic 6.0..pls let me know how to compile that dlll as COM dll...........

Thanks
Satya
 
This is not a straightforward topic. For more information on exposing .NET DLLs as COM objects, see the following help topic in the framework SDK:

[mshelp]ms-help://MS.NETFrameworkSDK/vblr7net/html/valrfCOMClassAttribute.htm[/mshelp]
 
Back
Top