Share via


Visual Basic Compiler Options Listed Alphabetically

The Visual Basic command-line compiler is provided as an alternative to compiling programs from the Visual Studio 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.

/codepage

Specifies the code page to use for all source code files in the compilation.

/debug

Produces debugging information.

/define

Defines symbols for conditional compilation.

/delaysign

Specifies whether the assembly will be fully or partially signed.

/doc

Processes documentation comments to an XML file.

/errorreport

Specifies how the Visual Basic compiler should report internal compiler errors.

/filealign

Specifies where to align the sections of the output file.

/help

Displays compiler options. This command is the same as specifying the /? option. No compilation occurs.

/highentropyva

Indicates whether a particular executable supports high entropy Address Space Layout Randomization (ASLR).

/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 that contains a key or key pair to give an assembly a strong name.

/langversion

Specifies that the compiler should accept only syntax that is included in the specified version of Visual Basic.

/libpath

Specifies the location of assemblies referenced by the /reference option.

/linkresource

Creates a link to a managed resource.

/main

Specifies the class that contains the SubMain procedure to use at startup.

/moduleassemblyname

Specifies the name of the assembly that a module will be a part of.

/netcf

Sets the compiler to target the .NET Compact Framework.

/noconfig

Do not compile with Vbc.rsp.

/nologo

Suppresses compiler banner information.

/nostdlib

Causes the compiler not to reference the standard libraries.

/nowarn

Suppresses the compiler's ability to generate warnings.

/nowin32manifest

Instructs the compiler not to embed any application manifest into the executable file.

/optimize

Enables/disables code optimization.

/optioncompare

Specifies whether string comparisons should be binary or use locale-specific text semantics.

/optionexplicit

Enforces explicit declaration of variables.

/optioninfer

Enables the use of local type inference in variable declarations.

/optionstrict

Enforces strict language semantics.

/out

Specifies an output file.

/platform

Specifies the processor platform the compiler targets for the 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.

/sdkpath

Specifies the location of Mscorlib.dll and Microsoft.VisualBasic.dll.

/subsystemversion

Specifies the minimum version of the subsystem that the generated executable file can use.

/target

Specifies the format of the output file.

/utf8output

Displays compiler output using UTF-8 encoding.

/vbruntime

Specifies that the compiler should compile without a reference to the Visual Basic Runtime Library, or with a reference to a specific runtime library.

/verbose

Outputs extra information during compilation.

/warnaserror

Promotes warnings to errors.

/win32icon

Inserts an .ico file into the output file.

/win32manifest

Identifies a user-defined Win32 application manifest file to be embedded into a project's portable executable (PE) file.

/win32resource

Inserts a Win32 resource into the output file.

See Also

Reference

Visual Basic Compiler Options Listed by Category

C# Compiler Options Listed Alphabetically

C# Compiler Options Listed by Category

Concepts

Introduction to the Project Designer