O'Reilly logo

VB .NET Language in a Nutshell by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-Line Switches

The VB .NET compiler supports the following command-line switches.

Output Filename and File Type

Switch

Description

/out:<file>

Defines the output filename. If not present, the output file will have the same root filename as the input file. <file> can be the root filename without a file extension.

/target:<type>

or:

/t:<type>

Defines the type of file to be generated by the compiler. <type> can be any of the following keywords: exe (to create a console application), winexe (to create a Windows application), library (to create a library assembly in a DLL), and module (to create a .NETMODULE file that can be added to an assembly). If the switch is not present, type defaults to exe, and the compiler attempts to create a console application.

Input Files

Switch

Description

/addmodule:<file>

Includes the .NETMODULE file named <file> in the output file.

/libpath:<path_list>

The directory or directories to search for metadata references (which are specified by the /reference switch) that are not found in either the current directory or the CLR’s system directory. <path_list> is a list of directories, with multiple directories separated by commas or semicolons. Note that /libpath is additive; using multiple switches adds <path_list> to existing paths rather than replacing the existing ones.

/recurse:<wildcard>

Includes all files in the current directory and its subdirectories according to the wildcard specifications. For example:

vbc /recurse:*.vb ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required