|
| 1 | +--- |
| 2 | +title: "-Build (devenv.exe)" |
| 3 | +ms.custom: na |
| 4 | +ms.date: 10/03/2016 |
| 5 | +ms.prod: visual-studio-dev14 |
| 6 | +ms.reviewer: na |
| 7 | +ms.suite: na |
| 8 | +ms.technology: |
| 9 | + - vs-ide-general |
| 10 | +ms.tgt_pltfrm: na |
| 11 | +ms.topic: article |
| 12 | +H1: /Build (devenv.exe) |
| 13 | +ms.assetid: ced21627-7653-455b-8821-3e31c6a448cf |
| 14 | +caps.latest.revision: 15 |
| 15 | +manager: ghogen |
| 16 | +translation.priority.ht: |
| 17 | + - cs-cz |
| 18 | + - de-de |
| 19 | + - es-es |
| 20 | + - fr-fr |
| 21 | + - it-it |
| 22 | + - ja-jp |
| 23 | + - ko-kr |
| 24 | + - pl-pl |
| 25 | + - pt-br |
| 26 | + - ru-ru |
| 27 | + - tr-tr |
| 28 | + - zh-cn |
| 29 | + - zh-tw |
| 30 | +--- |
| 31 | +# -Build (devenv.exe) |
| 32 | +Builds a solution using a specified solution configuration file. |
| 33 | + |
| 34 | +## Syntax |
| 35 | + |
| 36 | +``` |
| 37 | +Devenv SolutionName /build SolnConfigName [/project ProjName [/projectconfig ProjConfigName]] |
| 38 | +``` |
| 39 | + |
| 40 | +## Arguments |
| 41 | + `SolutionName` |
| 42 | + Required. The full path and name of the solution file. |
| 43 | + |
| 44 | + `SolnConfigName` |
| 45 | + Required. The name of the solution configuration that will be used to build the solution named in `SolutionName`. |
| 46 | + |
| 47 | + /project `ProjName` |
| 48 | + Optional. The path and name of a project file within the solution. You can enter a relative path from the `SolutionName` folder to the project file, or the project's display name, or the full path and name of the project file. |
| 49 | + |
| 50 | + /projectconfig `ProjConfigName` |
| 51 | + Optional. The name of a project build configuration to be used when building the `/project` named. |
| 52 | + |
| 53 | +## Remarks |
| 54 | + This switch performs the same function as the **Build Solution** menu command within the integrated development environment (IDE). |
| 55 | + |
| 56 | + Enclose strings that include spaces in double quotation marks. |
| 57 | + |
| 58 | + Summary information for builds, including errors, can be displayed in the **Command** window, or in any log file specified with the `/out` switch. |
| 59 | + |
| 60 | + This command only builds projects that have changed since the last build. To build all projects in a solution, use [/Rebuild (devenv.exe)](../VS_IDE/-Rebuild--devenv.exe-.md). |
| 61 | + |
| 62 | +## Example |
| 63 | + This example builds the project `CSharpConsoleApp`, using the `Debug` project build configuration within the `Debug` solution configuration of `MySolution`. |
| 64 | + |
| 65 | +``` |
| 66 | +devenv "C:\Documents and Settings\someuser\My Documents\Visual Studio\Projects\MySolution\MySolution.sln" /build Debug /project "CSharpWinApp\CSharpWinApp.csproj" /projectconfig Debug |
| 67 | +``` |
| 68 | + |
| 69 | +## See Also |
| 70 | + [Building and Cleaning Projects and Solutions in Visual Studio](../VS_IDE/Building-and-Cleaning-Projects-and-Solutions-in-Visual-Studio.md) |
| 71 | + [Devenv Command Line Switches](../VS_IDE/Devenv-Command-Line-Switches.md) |
| 72 | + [/Rebuild (devenv.exe)](../VS_IDE/-Rebuild--devenv.exe-.md) |
| 73 | + [/Clean (devenv.exe)](../VS_IDE/-Clean--devenv.exe-.md) |
| 74 | + [/Out (devenv.exe)](../VS_IDE/-Out--devenv.exe-.md) |
0 commit comments