How to: Compile and Run a Project in Visual Basic

 

Updated: July 20, 2015

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

The Visual Studio Integrated Development Environment (IDE) makes it easy to compile a project and run the resulting application.

You can use the debugger built into the IDE to debug your project as it runs. For more information about debugging, see Debugging Your Visual Basic Application and Edit and Continue (Visual Basic).

System_CAPS_ICON_note.jpg Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Personalizing the IDE.

To compile and run the current project

  • Press F5 while you are in the Visual Studio Integrated Development Environment (IDE).

    The IDE compiles the project and runs the application within the Visual Studio debugger.

To compile and run the current project from the menu

  • From the Debug menu of the Visual Studio IDE, choose Start Debugging.

    The IDE compiles the project and runs the application within the Visual Studio debugger.

To compile and run the current project without debugging

  • Press CTRL+F5 in the Visual Studio IDE.

    The IDE compiles the project and runs the application.

For information about compiling and running Visual Basic code using the command-line compiler, see Building from the Command Line.

Debugging Your Visual Basic Application
Building from the Command Line
Edit and Continue (Visual Basic)

Show: