Visual Basic Compiler (vbc.exe)

The following table shows some of the common usages of the Visual Basic compiler:

Option

Description

/cls

This option enables common language specification (CLS) checking.

/debug

With this option, the compiler will emit debugging information in the output file.

/define: symbol or /d: symbol

Use this option to define preprocessor symbols.

/help or /?

This option shows the command-line help for the Visual Basic compiler.

/keycontainer:keycontainer

keycontainer specifies the key container that contains the key pair for signing the assembly. See sn.exe for information on generating the key container.

/keyfile:keyfile

keyfile specifies the key file that contains the key pair for signing the assembly. See sn.exe for information on generating the key file.

/main:classname

If there is more than one Main entry in different classes, you will have to specify the Main entry in which class you want the entry point of the application.

/out:filename

This option represents the output filename.

optionexplicit[+/-]

Turn on or off optionexplicit to enforce explicit or implicit declaration of variables. The default setting is on.

optionstrict[+/-]

Turn on or off optionstrict to disallow or allow casting with truncation. The default setting is on.

/reference: libname or /r: libname

This option allows single or multiple libraries be included with this compilation. For multiple libraries to be included, use a semicolon as the delimiter. ...

Get .Net Framework Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.