This is really weird ! I compiled(released) my proj from within the IDE , then worked fine(output dll ) with no errors .But with CL , I got like 30 errors or so and a msg said "Maximum number of errors has been exceeded" ? What might be wrong ?
Printable View
This is really weird ! I compiled(released) my proj from within the IDE , then worked fine(output dll ) with no errors .But with CL , I got like 30 errors or so and a msg said "Maximum number of errors has been exceeded" ? What might be wrong ?
What kind of errors were reported?
When you compiled your app in the IDE, was there anything in the output window (I think that is what it is called - the one where it shows errors). Maybe there was warnings in the IDE, but the CL calls them errors...
in the IDE no errors , no warnings at all . CL didn't output any file .:rolleyes:
I used this command , Wondering if I have to include specific directives .
vbc /target:library /out:DBdll.dll databaseclass.vb
Damn that face , it should be like this :
vbc /target:library /out:bdBdll.dll databaseclass.vb
You need to include the /references command line switch and list all the dlls your project references. For example:
The IDE does that for you behind the scenes.VB Code:
vbc /references:system.dll,system.web.dll /target:library /out:bdBdll.dll databaseclass.vb
It could be . brb .:D
No , it gives the same result . Look at the attachted image .(I know it doesn't clearly shows the errors but jpg would take more than 100k)
It's underlining the stuff it doesn't know about, you need to include every dll your project references, doesn't system.data.dll contain the oledb/data stuff? that needs to be included in the references switch.
Those are all just reference errors.
You are going to have to make sure everything has a reference when compiling it. You are leaving out the system.data namespace, the system.data.OleDb reference....etc...
I don't what's wrong now is what I'm doing correct?:rolleyes:
It gives me the same error .
vbc /references:System.dll,System.windows.forms.dll,system.drawing.dll,system.data.dll,system.data.oledb. dll,system.xml.dll /target:library /out:mydbdll.dll databaseclass.vb
*bump*
hmmm, well not sure what's goin on. I coded up a little test app and tried it and it worked like a champ(but i also don't know what alls in your code, my sample is REALLY simple), here are some screen shots.
Here's a shot of my ide.
And here's a shot of my command line params.
I got few errors now I think but no output !Can you figure out what's wrong again ?
Second Screen..
Now it looks like it can't find any of the objects in the System.Windows.Forms.dll, did you include that in your /references switch list?
I did both of these with no luck :
vbc /t:library /out:bin/mydbdll.dll /r:System.dll,System.windows.forms.dll,system.drawing.dll,system.data.dll,system.xml.dll databaseclass.vb
vbc /t:library /out:c:\mydbdll.dll /r:System.dll,System.windows.forms.dll,system.drawing.dll,system.data.dll,system.xml.dll databaseclass.vb
hmmm, if ya want post the file databaseclass.vb and i'll try to compile it, i'm kinda outta ideas.
It's regular Classfile contains all database methods ever . Sorry I can't post it here . I should tell you that it's attachted (added) to myproj (winforms) Do you think I should compile it by itself ?:rolleyes:
it's worth a try, maybe just create a new console app, add your databaseclass.vb file and the necessary references to make it compile in the ide then try it from commandline.
Yeah , it's worth it really . Well , actually the IDE compiled it but I just wanted to compile that in CL .
Thanks for your time anyways . brb :)
The problem now is with "Format" and "Now" keywords. It says , they are not declared . BTW , I replaced "msgbox" keywords with "MessageBox.Show" because I got errors sound it didn't find "msgbox" declaration .I believe that have to do with VisualBasic Namespace.
The Microsoft.VisualBasic namespace is needed for those.
Yeeeeeeesssssss :D, I got it . That's what I thought .
Thanks guys .:)
Hmm , that's really weird !:rolleyes: . How come when I run that within the IDE even without Import Visualbasic library , I get no errors but the opposite while CL Compilation ??
If your using VB.Net in the VS IDE, then it automatically references that namespace for you.
I don't know really but have you seen that somewhere in the option menu ?
It is one of the VB.Net's features.... It allows you to take advantage of all those VB things from VB6 without having to reference something first.
Yup hellswraith , that makes more sense now .:)
Glad you got it all sorted out. I really dislike compiling from the command line...lol. Too much typing for me. :)