Manual Compiling

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

Hello, trying to round out my knowlege here about compiling. To date I
have used VS.Net to do all my compiling "majically", but I want to
understand how to do it on my own, should the need ever arrise.

It has been suggested to me that I should use the following pattern when
compiling my programs, but I am not sure I understand the "pattern",

Try creating a text file along the following lines where the /r are the
dlls
you are importing. (this may take some time to get right) then do vbc
@yourtextfile at dos prompt. The following should be on one line.

/t:library /out:c:\pathtobin\nameof.dll c:\pathtofile\name.vb
/r:system.dll
/r:system.web.dll /r:system.xml.dll /r:system.data.dll

So I am trying to translate this suggestion...

Any object in which I am specifying an "Imports" statement (VB.Net) in
my program is a "dll". Is this correct?

When I do as suggested on a "helper/utility class" (used by other
classes), I get errors like the following:

error BC30420: 'Sub Main' was not found in 'Compile_DatabaseAccess'.
error BC30188: Declaration expected (underlining the following:
/r:Microsoft.VisualBasic and /r:System.Collections)

This error is followed by several pages of "BC30188: Declaration
expected".

Here is the text file I created per the suggestion above...

/t:library /out:H:\Temp\TempASP.NET\DataBaseAccess.dll H:\Temp
\TempASP.NET\DataBaseAccess.vb /r:system.dll /r:system.web.dll
/r:system.xml.dll /r:system.data.dll /r:Imports System.Data.SqlClient
/r:System.Web.UI /r:System.Web.UI.WebControls /r:Microsoft.VisualBasic
/r:System.Configuration /r:System.Collections

Any Ideas what I am doing wrong?
 
Any object in which I am specifying an "Imports" statement (VB.Net) in
my program is a "dll". Is this correct?
no. objects are not imported only assemblies via their namespace.
 
Back
Top