Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Visual Studio .NET 2003

Causes the compiler to create an executable console application.





The /target:exe option is the default when no /target option is specified. The executable file is created with a .exe extension.

Use /target:winexe to create a Windows program executable.

Unless otherwise specified with the /out option, the output file name takes the name of the input file that contains the Sub Main procedure.

Only one Sub Main procedure is required in the source code files that are compiled into a .exe file. The /main compiler option lets you specify which class contains the Sub Main procedure.

/t:exe is the short form of /target:exe.

To set /target:exe in the Visual Studio integrated development environment

  1. Open the project's Property Pages dialog box. For details, see <Projectname> Property Pages Dialog Box.
  2. Click the Common Properties folder.
  3. Click the General property page.
  4. Modify the Output type property.

To set /target:exe programmatically


Both of the following two command lines compile in.vb, creating a console application called in.exe:

vbc /target:exe in.vb
vbc in.vb

See Also

/main | /target | /target:library | /target:module | /target:winexe | Visual Basic Compiler Options | /out | Sample Compilation Command Lines

© 2015 Microsoft