The Visual Basic .NET command-line compiler is provided as an alternative to compiling programs from within the Visual Studio .NET integrated development environment (IDE). The following is a list of the Visual Basic command-line compiler options sorted alphabetically.
| Option | Purpose |
|---|---|
| @ (Specify Response File) | Specifies a response file. |
| /? | Displays compiler options. This command is the same as specifying the /help option. No compilation occurs. |
| /addmodule | Causes the compiler to make all type information from the specified file(s) available to the project you are currently compiling. |
| /baseaddress | Specifies the base address of a DLL. |
| /bugreport | Creates a file that contains information that makes it easy to report a bug. |
| /debug | Produces debugging information. |
| /define | Defines symbols for conditional compilation. |
| /delaysign | Specifies whether the assembly will be fully or partially signed. |
| /help | Displays compiler options. This command is the same as specifying the /? option. No compilation occurs. |
| /imports | Imports a namespace from a specified assembly. |
| /keycontainer | Specifies a key container name for a key pair to give an assembly a strong name. |
| /keyfile | Specifies a file containing a key or key pair to give an assembly a strong name. |
| /libpath | Specifies the location of assemblies referenced via the /reference option. |
| /linkresource | Creates a link to a managed resource. |
| /main | Specifies the class that contains the Sub Main procedure to use at startup. |
| /nologo | Suppresses compiler banner information. |
| /nowarn | Suppresses the compiler's ability to generate warnings. |
| /optimize | Enables/disables code optimization. |
| /optioncompare | Determines whether string comparisons should be binary or use locale-specific text semantics. |
| /optionexplicit | Requires explicit declaration of variables. |
| /optionstrict | Enforces strict language semantics. |
| /out | Specifies an output file. |
| /quiet | Prevents the compiler from displaying code for syntax-related errors and warnings. |
| /recurse | Searches subdirectories for source files to compile. |
| /reference | Imports metadata from an assembly. |
| /removeintchecks | Disables integer overflow checking. |
| /resource | Embeds a managed resource in an assembly. |
| /rootnamespace | Specifies a namespace for all type declarations. |
| /target | Specifies the format of the output file using one of four options: /target:exe, /target:library, /target:module, or /target:winexe. |
| /utf8output | Displays compiler output using UTF-8 encoding. |
| /verbose | Outputs extra information during compilation. |
| /warnaserror | Promotes warnings to errors. |
| /win32icon | Inserts a .ico file into the output file. |
| /win32resource | Inserts a Win32 resource into the output file. |
Visual Basic Compiler Options Listed by Category |