Building Applications in Visual Studio
You can use Visual Studio to build applications and to create assemblies and executable programs at frequent intervals during a development cycle. By building your code often, you can identify compile-time errors, such as incorrect syntax, misspelled keywords, and type mismatches, earlier. You can also detect and correct run-time errors, such as logic errors and semantic errors, by frequently building and running debug versions of the code.
When you have fully developed and sufficiently debugged a project or solution, you can compile its components in a Release build. By default, a Release build is optimized and designed to be smaller and run faster than a debug version. For more information, see Walkthrough: Building an Application.
Choosing a Build Method
You can build an application by using the default build options in the IDE, at a command prompt, or by using Team Foundation Build. Each of these options use MSBuild as the underlying technology, and each approach has specific benefits, as the following table shows.
Build Method |
Benefits |
For more information |
---|---|---|
Using the IDE |
|
Building and Cleaning Projects and Solutions in Visual Studio |
Running an MSBuild command line |
|
|
Using Team Foundation Build |
|
Building from the IDE
When you create a project, default build configurations are defined for it, and a solution build configuration is assigned to it to provide context for builds. Solution configurations define how the projects in solution are built and deployed. Project configurations are a set of project properties that are unique for a platform and build type (for example, Release Win32). You can edit these default configurations, and you can create your own configurations. For more information, see Introduction to the Project Designer and How to: Modify Project Properties and Configuration Settings.
From within the IDE, you can perform the following additional tasks:
Identify projects that are dependent on the output from another project in order to build correctly.
Change the amount of information included in the build log or Output window for builds.
Hide specific compiler warnings for Visual C#, Visual C++, or Visual Basic.
Specify custom pre-compile and post-compile actions for a build.
Improve build performance by using parallel builds. For more information, see Building Multiple Projects in Parallel or the blog post Tuning C++ build parallelism.
See Also
Tasks
How to: Create and Remove Project Dependencies
Concepts
Walkthrough: Building an Application
Understanding Build Configurations
Building (Compiling) Web Site Projects