Skip to content

Commit 036564b

Browse files
Merge pull request #13199 from ghogen/setup-project
Add info about building setup projects
2 parents c6c18e7 + 643ce11 commit 036564b

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/ide/reference/build-devenv-exe.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,32 @@ devenv SolutionName /Build [SolnConfigName [/Project ProjName [/ProjectConfig Pr
5858
5959
- If you get an error message that says **Invalid project configuration**, make sure that you've specified a solution platform or project platform (for example, `Debug|Win32`).
6060
61-
## Example
61+
## Examples
6262
6363
The following command builds the project `CSharpWinApp`, using the `Debug` project build configuration within `MySolution`.
6464
6565
```shell
6666
devenv "%USERPROFILE%\source\repos\MySolution.sln" /build Debug /project "CSharpWinApp\CSharpWinApp.csproj" /projectconfig Debug
6767
```
6868
69+
And to clean up all the build files:
70+
71+
```shell
72+
devenv "%USERPROFILE%\source\repos\MySolution.sln" /clean
73+
```
74+
75+
## Build a setup project
76+
77+
To build an installer (`.msi` file), you need a [setup project](../../deployment/installer-projects-net-core.md), which has a `.vdproj` project file, but to build it you first need to apply a workaround that sets a particular registry key. From the Visual Studio Developer command prompt, run the executable *DisableOutOfProcBuild.exe* from the folder *Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild*. Without this workaround, you may get the error: `ERROR: An error occurred while validating. HRESULT = '8000000A'`. The command affects the current user, so for build agent scenarios, be sure to run it from the same account that runs the build. For more information, see the *README.txt* file in the same folder.
78+
79+
Also, in Visual Studio, you can create a new [configuration](../../ide/understanding-build-configurations.md), say `Setup`, based on the `Release` configuration, and select the setup project as a project to build. By default, setup projects aren't included in the default configurations, `Debug` and `Release`. With the `Setup` configuration defined, the following commands build a project `WindowsFormsApp1` and its associated setup project to generate the `.msi` file:
80+
81+
```shell
82+
devenv WindowsFormsApp1.sln /build Setup
83+
```
84+
85+
If the solution was already built with the **Release** configuration, this command just builds the setup project.
86+
6987
## See also
7088
7189
- [Build and clean projects and solutions](../../ide/building-and-cleaning-projects-and-solutions-in-visual-studio.md)

0 commit comments

Comments
 (0)