1vbnc(1)                     General Commands Manual                    vbnc(1)
2
3
4

NAME

6       vbnc, vbnc2 - Mono Visual Basic Compiler.
7

SYNOPSIS

9       vbnc [option] [source-files]
10

DESCRIPTION

12       (vbnc) is a CIL compiler for the VisualBasic.NET language.
13
14       Applications  developed  on  Windows  with  vbc can execute on Mono and
15       applications compiled with 'vbnc' can be executed on .NET runtime.
16
17       The Mono Visual Basic compiler accepts the same options as  the  Micro‐
18       soft  VB.NET  compiler.  Those options can start with a slash or a dash
19       (/checked is the same as -checked).
20
21       Visual Basic.NET source files normally ends  with  a  ".vb"  extension.
22       Compilation of VB.NET source code requires all the files that make up a
23       library, module or executable to  be  provided  on  the  command  line.
24       There  is  no support for partial compilation.  To achieve the benefits
25       of partial compilation, you should  compile  programs  into  their  own
26       assemblies, and later reference them with the "-r" flag.
27
28       The  Mono Basic compiler generates images (.exe files) that contain CIL
29       byte code that can be executed by any system that implements  a  Common
30       Language Infrastructure virtual machine such as the Microsoft .NET run‐
31       time engine on Windows or the Mono  runtime  engine  on  Unix  systems.
32       Executables are not bound to a specific CPU or operating system.
33
34       The  Mono  Basic  compiler by default only references these assemblies:
35       mscorlib.dll, Microsoft.VisualBasic.dll, System.dll and System.Xml.dll.
36       If you want to reference extra libraries you must manually specify them
37       using the the -r: command line option.
38
39       The vbnc compiler is used to compile against the latest available  pro‐
40       file (currently the 4.0 profile).
41
42       The vbnc2 compiler is used to compile against the 2.0 profile.
43

OPTIONS

45       -addmodule:MODULE1[,MODULE2]
46              Includes the specified modules in the resulting assembly.
47
48       -codepage:ID
49              Specifies the code page used to process the input files from the
50              point it is specified on.  By default files will be processed in
51              the  current  code  page.   The compiler will also automatically
52              detect Unicode/UTF8 files that have an embedded byte mark at the
53              beginning.
54
55       Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001
56       (UTF-8).
57
58       -define:SYMLIST, -d:SYMLIST
59              Defines the symbol listed by the semi-colon separeted list  SYM‐
60              LIST  SYMBOL.  This can be tested in the source code by the pre-
61              processor, or can be used by methods that have been tagged  with
62              the Conditional attribute.
63
64       -debug:AMOUNT
65              Specify  the  amount  of debugging information to emit. Possible
66              values for AMOUNT are "full" and "pdbonly".
67
68       -imports:import-list
69              Declare global Imports for listed namespaces.
70
71       -ignorewarn:XXXX
72              Ignores warning number XXXX.
73
74       -lib:PATHLIST, -libpath:PATHLIST
75              Each path specified in the comma-separated list will direct  the
76              compiler to look for libraries in that specified path.
77
78       -main:CLASS
79              Tells  the  compiler  which  CLASS  or MODULE contains the entry
80              point. Useful when you are compiling several classes with a Main
81              method.
82
83       -nologo
84              Suppress printing copyright information on startup.
85
86       -nostdlib, -nostdlib+
87              Use  this  flag  if  you want to compile the core library.  This
88              makes the compiler load its internal  types  from  the  assembly
89              being compiled.
90
91       -noconfig, -noconfig+
92              Disables  the  default compiler configuration to be loaded.  The
93              compiler by default has references to the system assemblies.
94
95       -nowarn
96              Makes the compiler ignore warnings.
97
98       -optioncompare:binary, -optioncompare:text
99              Select between binary and text string comparisons.  The  default
100              is binary string comparisons.
101
102       -optionexplicit[+|-]
103              Require explicit declaration of variables
104
105       -optionstrict[+|-]
106              Enforce strict language semantics
107
108       -out:FNAME, -o FNAME
109              Names the output file to be generated.
110
111       -q -quiet
112              Commands  the  compiler  to show only error messages for syntax-
113              related errors and warnings.
114
115       -resource:RESOURCE[,ID]
116              Embeds to the given resource file.  The optional ID can be  used
117              to give a different name to the resource.  If not specified, the
118              resource name will be the file name.
119
120       -linkresource:RESOURCE[,ID]
121              Links to the specified RESOURCE.  The optional ID can be used to
122              give a name to the linked resource.
123
124       -r:ASSEMBLY1[,ASSEMBLY2], -r ASSEMBLY1[,ASSEMBLY2]
125              Reference  the  named  assemblies.  Use this to use classes from
126              the named assembly in your program.  The assembly will be loaded
127              from  either the system directory where all the assemblies live,
128              or from the path explicitly given with the -L option.
129
130       You can also use a semicolon to separate the assemblies  instead  of  a
131       comma.
132
133       -sdkpath:PATH
134              Sets the path to the required framework assemblies (mscorlib.dll
135              and Microsoft.VisualBasic.dll). To compile to a  different  pro‐
136              file than the default, use this option to the path to the mscor‐
137              lib.dll of the profile you want to compile to.
138
139       -removeintchecks[+|-]
140              Remove integer checks. Default off.
141
142       -rootnamespace:namespace
143              Specifies the root namespace for all type declarations
144
145       -target:KIND, -t:KIND
146              Used to specify the desired target.  The  possible  values  are:
147              exe   (plain  executable),  winexe  (Windows.Forms  executable),
148              library (component libraries) and module (partial library).
149
150       -utf8output[+|-]
151              Emit compiler  output  in  UTF8  character  encoding.  Currently
152              ignored.
153
154       --version
155              Shows the compiler version.
156
157       -warnaserror, -warnaserror+
158              Treat warnings as errors.
159

STABILITY

161       As  of  early  2011, the Mono Visual Basic compiler is still considered
162       beta software. The compiler is feature-complete (targeting  the  Micro‐
163       soft Visual Basic 8 compiler), however crashes are still occuring, most
164       notably with incorrect code.
165

AUTHORS

167       See the ChangeLog for authors
168

LICENSE

170       The Mono Visual Basic compiler is released under the terms of  the  GNU
171       LGPL.  Alternative licenses are available from Novell.
172

SEE ALSO

174       mcs(1), mono(1), mint(1), sn(1)
175

BUGS

177       To  report  bugs  in  the compiler, you can file bug reports in our bug
178       tracking system: http://bugzilla.ximian.com.
179

MAILING LIST

181       The  Mono  Basic  Mailing   List   is   available   at:   mono-vb-list-
182       request@ximian.com
183
184
185
186                               21 February 2006                        vbnc(1)
Impressum