PDA

View Full Version : CommandLine Compiler Help


kamlesh_nadar
10-08-03, 02:12 AM
Hi,

I am trying to compile a .vb file through command line compiler that is vbc.exe. My .vb application has imported namespaces like System, System.Data, System.Data.SqlClient and System.Exception.

Now when I execut this statement wher dataaccess.vb is the file name -
vbc /t:library /r:system.dll,system.data.dll,system.data.sqlclient .dll,system.exception.dll dataaccess.vb
it throws an error -
vbc : Command line error BC2017 : could not find library 'system.data.sqlclient.dll'
vbc : Fatal error BC2000 : compiler initialization failed unexpectedly: The system cannot find the file specified.

Can any one assist me to over come this error.

Thanking You,

Kamliesh Nadar

Shane
10-12-03, 05:44 PM
Hi,

I am trying to compile a .vb file through command line compiler that is vbc.exe. My .vb application has imported namespaces like System, System.Data, System.Data.SqlClient and System.Exception.

Now when I execut this statement wher dataaccess.vb is the file name -
vbc /t:library /r:system.dll,system.data.dll,system.data.sqlclient .dll,system.exception.dll dataaccess.vb
it throws an error -
vbc : Command line error BC2017 : could not find library 'system.data.sqlclient.dll'
vbc : Fatal error BC2000 : compiler initialization failed unexpectedly: The system cannot find the file specified.

Can any one assist me to over come this error.

Thanking You,

Kamliesh Nadar

You don't have to include all the dlls when you compile. Most namespaces are already included in an existing DLL (like system.data.dll). So take out the system.data.sqlclient.dll reference.