This documentation is archived and is not being maintained.

/target:winexe

Visual Studio .NET 2003

Causes the compiler to create an executable Windows program.

/target:winexe

-or-

/t:winexe

Remarks

The executable file is created with a .exe extension. A Windows program is one that provides a user interface from either the Services Framework class library or with the Win32 APIs.

Use /target:exe to create a console application.

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 in cases where your code has more than one class with a Sub Main procedure.

The short form of /target:winexe is /t:winexe.

To set /target:winexe 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:winexe programmatically

Example

The following code compiles in.vb into a Windows program:

vbc /target:winexe in.vb

See Also

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

Show: