2007-02-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
[mono.git] / man / vbnc.1
1 .TH vbnc 1 "21 February 2006"
2 .SH NAME 
3 vbnc \- Mono Visual Basic Compiler.
4 .SH SYNOPSIS
5 .B vbnc
6 [option] [source-files]
7 .SH DESCRIPTION
8 .PP
9 .I  (vbnc) 
10 is a CIL compiler for the VisualBasic.NET language.
11 .PP
12 Applications developed on Windows with vbc can execute on Mono and applications
13 compiled with 'vbnc' can be executed on .NET runtime.
14 .PP
15 The Mono Visual Basic compiler accepts the same options as  
16 the Microsoft VB.NET compiler. Those options can start with a slash or a 
17 dash (/checked is the same as -checked).
18 .PP
19 Visual Basic.NET source files normally ends with a ".vb" extension.  
20 Compilation of VB.NET source code requires all the files that make 
21 up a library, module or executable to be provided on the command line.  
22 There is no support for partial compilation.  To achieve the benefits
23 of partial compilation, you should compile programs into their own
24 assemblies, and later reference them with the "-r" flag.
25 .PP
26 The Mono Basic compiler generates images (.exe files) that contain 
27 CIL byte code that can be executed by any system that implements a Common
28 Language Infrastructure virtual machine such as the Microsoft .NET
29 runtime engine on Windows or the Mono runtime engine on Unix systems.
30 Executables are not bound to a specific CPU or operating system.
31 .PP
32 The Mono Basic compiler by default only references these assemblies:
33 mscorlib.dll, Microsoft.VisualBasic.dll, System.dll and System.Xml.dll.
34 If you want to reference extra libraries you must manually specify 
35 them using the the -r: command line option.
36 .PP
37 .SH OPTIONS
38 .TP
39 .I \-addmodule:MODULE1[,MODULE2]
40 Includes the specified modules in the resulting assembly.  
41 .TP
42 .I -codepage:ID
43 Specifies the code page used to process the input files from the
44 point it is specified on.  By default files will be processed in the
45 current code page.  The compiler will also automatically detect
46 Unicode/UTF8 files that have an embedded byte mark at the beginning.   
47 .TP
48 Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8).
49 .TP
50 .I \-define:SYMLIST, -d:SYMLIST
51 Defines the symbol listed by the semi-colon separeted list SYMLIST
52 SYMBOL.  This can be tested in the source code by the pre-processor,
53 or can be used by methods that have been tagged with the Conditional
54 attribute. 
55 .TP
56 .I \-debug:AMOUNT
57 Specify the amount of debugging information to emit. Possible values for 
58 AMOUNT are "full" and "pdbonly".
59 .TP
60 .I \-imports:import-list
61 Declare global Imports for listed namespaces. 
62 .TP
63 .I \-ignorewarn:XXXX
64 Ignores warning number XXXX.
65 .TP
66 .I -lib:PATHLIST, -libpath:PATHLIST
67 Each path specified in the comma-separated list will direct the
68 compiler to look for libraries in that specified path.
69 .TP
70 .I \-main:CLASS
71 Tells the compiler which CLASS or MODULE contains the entry point. Useful when
72 you are compiling several classes with a Main method.
73 .TP
74 .I \-nologo
75 Suppress printing copyright information on startup.
76 .TP
77 .I \-nostdlib, -nostdlib+
78 Use this flag if you want to compile the core library.  This makes the
79 compiler load its internal types from the assembly being compiled.
80 .TP
81 .I \-noconfig, \-noconfig+
82 Disables the default compiler configuration to be loaded.  The
83 compiler by default has references to the system assemblies. 
84 .TP
85 .I \-nowarn
86 Makes the compiler ignore warnings.
87 .TP
88 .I \-optioncompare:binary, \-optioncompare:text 
89 Select between binary and text string comparisons. The default is binary 
90 string comparisons.
91 .TP
92 .I \-optionexplicit[+|-]
93 Require explicit declaration of variables
94 .TP
95 .I \-optionstrict[+|-]
96 Enforce strict language semantics
97 .TP
98 .I \-out:FNAME, -o FNAME
99 Names the output file to be generated.
100 .TP
101 .I -q -quiet
102 Commands the compiler to show only error messages for syntax-related errors 
103 and warnings.
104 .TP
105 .I -resource:RESOURCE[,ID]
106 Embeds to the given resource file.  The optional ID can be used to
107 give a different name to the resource.  If not specified, the resource
108 name will be the file name.
109 .TP
110 .I -linkresource:RESOURCE[,ID]
111 Links to the specified RESOURCE.  The optional ID can be used to give
112 a name to the linked resource.
113 .TP
114 .I -r:ASSEMBLY1[,ASSEMBLY2], \-r ASSEMBLY1[,ASSEMBLY2]
115 Reference the named assemblies.  Use this to use classes from the named
116 assembly in your program.  The assembly will be loaded from either the
117 system directory where all the assemblies live, or from the path
118 explicitly given with the -L option.
119 .PP
120 You can also use a semicolon to separate the assemblies instead of a
121 comma. 
122 .TP
123 .I \-removeintchecks[+|-]
124 Remove integer checks. Default off.
125 .TP
126 .I \-rootnamespace:namespace
127 Specifies the root namespace for all type declarations
128 .TP
129 .I \-target:KIND, \-t:KIND
130 Used to specify the desired target.  The possible values are: exe
131 (plain executable), winexe (Windows.Forms executable), library
132 (component libraries) and module (partial library).
133 .TP
134 .I \-utf8output[+|-]
135 Emit compiler output in UTF8 character encoding. Currently ignored.
136 .TP
137 .I \-\-version
138 Shows the compiler version.
139 .TP
140 .I \-warnaserror, \-warnaserror+
141 Treat warnings as errors.
142 .SH STABILITY
143 As of early 2007, the Mono Visual Basic compiler is still considered preview 
144 software. The compiler is almost feature-complete (targeting the Microsoft
145 Visual Basic 8 compiler), only lacking support for the 'My' namespace.
146 Frequent crashes are still occuring, especially with incorrect code.
147 .PP
148 .SH AUTHORS
149 See the ChangeLog for authors
150 .PP
151 .SH LICENSE
152 The Mono Visual Basic compiler is released under the terms of the GNU LGPL.
153 Alternative licenses are available from Novell.
154 .PP
155 .SH SEE ALSO
156 mcs(1), mono(1), mint(1), sn(1)
157 .PP
158 .SH BUGS
159 To report bugs in the compiler, you can file bug reports in our 
160 bug tracking system: http://bugzilla.ximian.com.
161 .SH MAILING LIST
162 The Mono Basic Mailing List is available at: mono-vb-list-request@ximian.com