1vbnc(1) General Commands Manual vbnc(1)
2
3
4
6 vbnc - Mono Visual Basic Compiler.
7
9 vbnc [option] [source-files]
10
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
40 -addmodule:MODULE1[,MODULE2]
41 Includes the specified modules in the resulting assembly.
42
43 -codepage:ID
44 Specifies the code page used to process the input files from the
45 point it is specified on. By default files will be processed in
46 the current code page. The compiler will also automatically
47 detect Unicode/UTF8 files that have an embedded byte mark at the
48 beginning.
49
50 Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001
51 (UTF-8).
52
53 -define:SYMLIST, -d:SYMLIST
54 Defines the symbol listed by the semi-colon separeted list SYM‐
55 LIST SYMBOL. This can be tested in the source code by the pre-
56 processor, or can be used by methods that have been tagged with
57 the Conditional attribute.
58
59 -debug:AMOUNT
60 Specify the amount of debugging information to emit. Possible
61 values for AMOUNT are "full" and "pdbonly".
62
63 -imports:import-list
64 Declare global Imports for listed namespaces.
65
66 -ignorewarn:XXXX
67 Ignores warning number XXXX.
68
69 -lib:PATHLIST, -libpath:PATHLIST
70 Each path specified in the comma-separated list will direct the
71 compiler to look for libraries in that specified path.
72
73 -main:CLASS
74 Tells the compiler which CLASS or MODULE contains the entry
75 point. Useful when you are compiling several classes with a Main
76 method.
77
78 -nologo
79 Suppress printing copyright information on startup.
80
81 -nostdlib, -nostdlib+
82 Use this flag if you want to compile the core library. This
83 makes the compiler load its internal types from the assembly
84 being compiled.
85
86 -noconfig, -noconfig+
87 Disables the default compiler configuration to be loaded. The
88 compiler by default has references to the system assemblies.
89
90 -nowarn
91 Makes the compiler ignore warnings.
92
93 -optioncompare:binary, -optioncompare:text
94 Select between binary and text string comparisons. The default
95 is binary string comparisons.
96
97 -optionexplicit[+|-]
98 Require explicit declaration of variables
99
100 -optionstrict[+|-]
101 Enforce strict language semantics
102
103 -out:FNAME, -o FNAME
104 Names the output file to be generated.
105
106 -q -quiet
107 Commands the compiler to show only error messages for syntax-
108 related errors and warnings.
109
110 -resource:RESOURCE[,ID]
111 Embeds to the given resource file. The optional ID can be used
112 to give a different name to the resource. If not specified, the
113 resource name will be the file name.
114
115 -linkresource:RESOURCE[,ID]
116 Links to the specified RESOURCE. The optional ID can be used to
117 give a name to the linked resource.
118
119 -r:ASSEMBLY1[,ASSEMBLY2], -r ASSEMBLY1[,ASSEMBLY2]
120 Reference the named assemblies. Use this to use classes from
121 the named assembly in your program. The assembly will be loaded
122 from either the system directory where all the assemblies live,
123 or from the path explicitly given with the -L option.
124
125 You can also use a semicolon to separate the assemblies instead of a
126 comma.
127
128 -removeintchecks[+|-]
129 Remove integer checks. Default off.
130
131 -rootnamespace:namespace
132 Specifies the root namespace for all type declarations
133
134 -target:KIND, -t:KIND
135 Used to specify the desired target. The possible values are:
136 exe (plain executable), winexe (Windows.Forms executable),
137 library (component libraries) and module (partial library).
138
139 -utf8output[+|-]
140 Emit compiler output in UTF8 character encoding. Currently
141 ignored.
142
143 --version
144 Shows the compiler version.
145
146 -warnaserror, -warnaserror+
147 Treat warnings as errors.
148
150 As of early 2007, the Mono Visual Basic compiler is still considered
151 preview software. The compiler is almost feature-complete (targeting
152 the Microsoft Visual Basic 8 compiler), only lacking support for the
153 'My' namespace. Frequent crashes are still occuring, especially with
154 incorrect code.
155
157 See the ChangeLog for authors
158
160 The Mono Visual Basic compiler is released under the terms of the GNU
161 LGPL. Alternative licenses are available from Novell.
162
164 mcs(1), mono(1), mint(1), sn(1)
165
167 To report bugs in the compiler, you can file bug reports in our bug
168 tracking system: http://bugzilla.ximian.com.
169
171 The Mono Basic Mailing List is available at: mono-vb-list-
172 request@ximian.com
173
174
175
176 21 February 2006 vbnc(1)