Updated: July 20, 2015

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

Compiles source-code files in all child directories of either the specified directory or the project directory.


Optional. The directory in which you want the search to begin. If not specified, the search begins in the project directory.

Required. The file(s) to search for. Wildcard characters are allowed.

You can use wildcards in a file name to compile all matching files in the project directory without using /recurse. If no output file name is specified, the compiler bases the output file name on the first input file processed. This is generally the first file in the list of files compiled when viewed alphabetically. For this reason, it is best to specify an output file using the /out option.

System_CAPS_ICON_note.jpg Note

The /recurse option is not available from within the Visual Studio development environment; it is available only when compiling from the command line.

The following code compiles all Visual Basic files in the current directory.

vbc *.vb  

The following code compiles all Visual Basic files in the Test\ABC directory and any directories below it, and then generates Test.ABC.dll.

vbc /target:library /out:Test.ABC.dll /recurse:Test\ABC\*.vb  

Visual Basic Command-Line Compiler
/out (Visual Basic)
Sample Compilation Command Lines