Skip to content

Commit b8b98a4

Browse files
authored
Merge pull request #5179 from TylerMSFT/github4708
update steps
2 parents bec6cdb + 63a3952 commit b8b98a4

File tree

1 file changed

+36
-23
lines changed

1 file changed

+36
-23
lines changed

docs/ide/walkthrough-deploying-your-program-cpp.md

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,70 @@
11
---
22
description: "Learn more about: Walkthrough: Deploying Your Program (C++)"
33
title: "Walkthrough: Deploying Your Program (C++)"
4-
ms.date: "05/14/2019"
4+
ms.date: "01/30/2024"
55
helpviewer_keywords: ["deploying applications [C++], walkthroughs", "setup projects [C++]", "program deployments [C++]", "projects [C++], setup", "projects [C++], deploying programs", "application deployment [C++], walkthroughs"]
6-
ms.assetid: 79e6cc4e-dced-419d-aaf7-d62d1367603f
76
---
87
# Walkthrough: Deploying Your Program (C++)
98

10-
Now that you've created your application by completing the earlier related walkthroughs, the last step is to create an installer so that other users can install the program on their computers. For the installer, you'll add a new project to your existing solution. The output of this new project is a setup.exe file that will install your app on another computer.
9+
Now that you've created your application by completing the earlier related walkthroughs, the last step is to create an installer so that other users can install the program on their computers. For the installer, you add a new project to your existing solution. The output of this new project is a `setup.exe` file that can install your app on another computer.
1110

1211
The walkthrough shows how to use Windows Installer to deploy your application. You can also use ClickOnce to deploy an application. For more information, see [ClickOnce Deployment for Visual C++ Applications](../windows/clickonce-deployment-for-visual-cpp-applications.md). For more information about deployment in general, see [Deploying Applications, Services, and Components](/visualstudio/deployment/deploying-applications-services-and-components).
1312

1413
## Prerequisites
1514

1615
- The walkthrough assumes that you understand the fundamentals of the C++ language.
17-
1816
- It also assumes that you've completed the earlier related walkthroughs that are listed in [Using the Visual Studio IDE for C++ Desktop Development](using-the-visual-studio-ide-for-cpp-desktop-development.md).
19-
2017
- The walkthrough can't be completed in Express editions of Visual Studio.
18+
- The walkthrough can't be completed without the *Microsoft Visual Studio Installer Project* extension. Instructions for how to install it follow.
2119

22-
## Install the Visual Studio setup and deployment project template
20+
## Install the Visual Studio setup and deployment projects template
2321

24-
The steps in this section vary depending on which version of Visual Studio you have installed. To see the documentation for your preferred version of Visual Studio, use the **Version** selector control. It's found at the top of the table of contents on this page.
22+
The steps in this section vary depending on which version of Visual Studio you have installed. To see the documentation for your preferred version of Visual Studio, use the **Version** selector control. The control near the top of the table of contents on this page.
2523

2624
<!-- markdownlint-disable MD034 -->
2725

2826
::: moniker range=">=msvc-160"
2927

30-
### To install the setup and deployment project template for Visual Studio
28+
If you haven't already done so, download the *Microsoft Visual Studio Installer Projects* extension. The extension is free for Visual Studio developers and adds the setup and deployment project templates to Visual Studio.
3129

32-
1. If you haven't already done so, download the Microsoft Visual Studio Installer Projects extension. The extension is free for Visual Studio developers and adds the functionality of the setup and deployment project templates to Visual Studio. When you're connected to the Internet, in Visual Studio, choose **Extensions** > **Manage Extensions**. Under the **Extensions and Updates** dialog, select the **Online** tab and type *Microsoft Visual Studio Installer Projects* in the search box. Hit **Enter**, select **Microsoft Visual Studio \<version> Installer Projects**, and click **Download**. Choose to run and install the extension, then restart Visual Studio.
30+
1. When you're connected to the Internet, from the main menu in Visual Studio choose **Extensions** > **Manage Extensions**. The **Manage Extensions** dialog appears.
31+
1. Select the **Online** tab and type *Microsoft Visual Studio Installer Projects* in the search box. Hit **Enter**, select **Microsoft Visual Studio Installer Projects**, and click **Download**.
32+
1. Choose to run and install the extension, then restart Visual Studio.
3333

34-
1. On the Visual Studio menu bar, choose **File** > **Recent Projects and Solutions**, and then choose to reopen your project.
34+
### Create the setup project
3535

36-
1. On the menu bar, choose **File** > **New** > **Project** to open the **Create a New Project** dialog box. In the search box, type "Setup" and from the results list choose **Setup Project**.
36+
1. From the Visual Studio main menu, choose **File** > **Recent Projects and Solutions**, and then choose to reopen your project.
3737

38-
1. Enter a name for the setup project in the **Name** box. In the **Solution** drop-down list, select **Add to solution**. Choose the **OK** button to create the setup project. A **File Assistant (ProjectName)** tab opens in the editor window.
38+
1. From the main menu, choose **File** > **New** > **Project** to open the **Create a New Project** dialog box. In the search box, type `Setup` and from the results choose **Setup Project** and then **Next**.
3939

40-
1. Right-click the **Application Folder** node and select **Add** > **Project Output** to open the **Add Project Output Group** dialog box.
40+
1. Enter a name for the setup project in the **Name** box, such as `Setup`.
4141

42-
1. In the dialog box, select **Primary Output** and click **OK**. A new item named **Primary Output from Game (Active)** appears.
42+
1. In the **Solution** drop-down list, select **Add to solution**. Choose **Create** to create the setup project. A **File System** tab opens in the editor window.
4343

44-
1. Select the item **Primary Output from Game (Active)**, right-click and choose **Create Shortcut to Primary Output from Game (Active)**. A new item named **Shortcut to Primary Output from Game (Active)** appears.
44+
1. Right-click the **Application Folder** node in the left pane and select **Add** > **Project Output** to open the **Add Project Output Group** dialog box.
45+
46+
1. In the dialog box, select **Primary Output** and click **OK**. (You won't see Primary Output if you forgot to change the **Solution** dropdown to **Add to solution** in the earlier step). A new item named **Primary Output from Game (Active)** appears.
47+
48+
1. Select **Primary Output from Game (Active)**, right-click and choose **Create Shortcut to Primary Output from Game (Active)**. A new item named **Shortcut to Primary Output from Game (Active)** appears.
4549

4650
1. Rename the shortcut item to *Game*, then drag and drop the item into the **User's Programs Menu** node on the left side of the window.
4751

48-
1. In **Solution Explorer**, select the **Game Installer** project and choose **View** > **Properties Window** or hit **F4** to open the **Properties** window.
52+
1. In **Solution Explorer**, select the setup project and choose **View** > **Properties Window** to open the **Properties** window for the setup project.
4953

50-
1. Specify additional details as you want them to appear in the installer. For example, use *Contoso* for **Manufacturer**, *Game Installer* for **Product Name**, and *https\://www.contoso.com* for **SupportUrl**.
54+
1. Specify the other details in the property window the way you want them to appear in the installer. For example, use *Contoso* for **Manufacturer**, *Game Installer* for **Product Name**, and `https://www.contoso.com` for **SupportUrl**.
5155

52-
1. On the menu bar, choose **Build** > **Configuration Manager**. In the **Project** table, under the **Build** column, check the box for **Game Installer**. Click **Close**.
56+
### Build the setup project
5357

54-
1. On the menu bar, choose **Build** > **Build Solution** to build the Game project and the Game Installer project.
58+
1. From the main menu, choose **Build** > **Configuration Manager**.
5559

56-
1. In the solution folder, locate the setup.exe program that was built from the Game Installer project, and then run it to install the Game application on your computer. You can copy this file (and GameInstaller.msi) to install the application and its required library files on another computer.
60+
1. In the **Project contexts** table, under the **Build** column, check the box for the setup project, **Setup**. Click **Close**.
61+
62+
1. From the menu bar, choose **Build** > **Build Solution** to build the Game project and the installer project.
63+
64+
### Run the setup project
65+
66+
1. In the solution explorer, press the button to **Switch between solutions and available views** to switch to folder view.
67+
1. Navigate to the setup folder and the **Debug** folder under that. You can run the `setup.exe` program there, which was built from the setup project, to install the Game application on your computer. You can copy this file (and Setup.msi) to install the application and its required library files on another computer.
5768

5869
::: moniker-end
5970

@@ -77,7 +88,9 @@ The steps in this section vary depending on which version of Visual Studio you h
7788

7889
1. In the left pane of the dialog box, expand the **Installed** > **Other Project Types** nodes, and then select **Visual Studio Installer**. In the center pane, select **Setup Project**.
7990

80-
1. Enter a name for the setup project in the **Name** box. For this example, enter *Game Installer*. In the **Solution** drop-down list, select **Add to solution**. Choose the **OK** button to create the setup project. A **File Assistant (Game Installer)** tab opens in the editor window.
91+
1. Enter a name for the setup project in the **Name** box. For this example, enter *Game Installer*.
92+
93+
1. In the **Solution** drop-down list, select **Add to solution**. Choose the **OK** button to create the setup project. A **File Assistant (Game Installer)** tab opens in the editor window.
8194

8295
1. Right-click the **Application Folder** node and select **Add** > **Project Output** to open the **Add Project Output Group** dialog box.
8396

@@ -89,9 +102,9 @@ The steps in this section vary depending on which version of Visual Studio you h
89102

90103
1. In **Solution Explorer**, select the **Game Installer** project and choose **View** > **Properties Window** or hit **F4** to open the **Properties** window.
91104

92-
1. Specify additional details as you want them to appear in the installer. For example, use *Contoso* for **Manufacturer**, *Game Installer* for **Product Name**, and *https\://www.contoso.com* for **SupportUrl**.
105+
1. Specify the other details the way you want them to appear in the installer. For example, use *Contoso* for **Manufacturer**, *Game Installer* for **Product Name**, and *https\://www.contoso.com* for **SupportUrl**.
93106

94-
1. On the menu bar, choose **Build** > **Configuration Manager**. In the **Project** table, under the **Build** column, check the box for **Game Installer**. Click **Close**.
107+
1. On the menu bar, choose **Build** > **Configuration Manager**. In the **Project** table, under the **Build** column, check the box for the **Setup** project. Click **Close**.
95108

96109
1. On the menu bar, choose **Build** > **Build Solution** to build the Game project and the Game Installer project.
97110

0 commit comments

Comments
 (0)