You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Using the Visual Studio IDE for C++ Desktop Development"
3
-
ms.date: "03/14/2019"
3
+
ms.date: "04/25/2019"
4
4
helpviewer_keywords: ["IDE [C++]", "Visual Studio IDE [C++]"]
5
5
ms.assetid: d985c230-8e81-49d6-92be-2db9cac8d023
6
6
---
@@ -16,15 +16,19 @@ These walkthroughs assume that you have installed Visual Studio and the Visual C
16
16
17
17
If you haven't installed Visual Studio yet, now is the time.
18
18
19
+
**Visual Studio 2019 Installation**
20
+
21
+
To get Visual Studio 2019, you can download it from [Visual Studio Downloads](https://www.visualstudio.com/downloads/). Be sure to include the Visual C++ development tools when you install Visual Studio, because they are not installed by default. For more information about how to install Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
22
+
19
23
**Visual Studio 2017 Installation**
20
24
21
-
To get Visual Studio 2017, you can download it from [Visual Studio Downloads](https://www.visualstudio.com/downloads/download-visual-studio-vs.aspx). Be sure to include the Visual C++ development tools when you install Visual Studio, because they are not installed by default. For more information about how to install Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
25
+
To get Visual Studio 2017, you can download it from [Download older versions of Visual Studio](https://www.visualstudio.com/vs/older-downloads/). Be sure to include the Visual C++ development tools when you install Visual Studio, because they are not installed by default. For more information about how to install Visual Studio, see [Install Visual Studio](/visualstudio/install/install-visual-studio) and set the version selector on the page to **Visual Studio 2017**.
22
26
23
27
**Visual Studio 2015 Installation**
24
28
25
29
To install Visual Studio 2015, go to [Download older versions of Visual Studio](https://www.visualstudio.com/vs/older-downloads/). Run the setup program and choose **Custom installation** and then choose the C++ component.
26
30
27
-
In general, we highly recommend that you use Visual Studio 2017 even if you need to compile your code using the Visual Studio 2015 compiler. For more information, see [Use native multi-targeting in Visual Studio to build old projects](../porting/use-native-multi-targeting.md).
31
+
In general, we highly recommend that you use Visual Studio 2019 even if you need to compile your code using the Visual Studio 2017 or Visual Studio 2015 compiler. For more information, see [Use native multi-targeting in Visual Studio to build old projects](../porting/use-native-multi-targeting.md).
28
32
29
33
Once your Visual Studio installation is complete, you are ready to continue.
@@ -20,7 +20,19 @@ The walkthrough shows how to use Windows Installer to deploy your application. Y
20
20
21
21
- If you haven’t already done so, download the Microsoft Visual Studio Installer Projects extension, as described in the further steps later. The extension is free for Visual Studio developers and adds the functionality of the setup and deployment project templates to Visual Studio.
22
22
23
-
### To install the Visual Studio setup and deployment project template
23
+
## To install the Visual Studio setup and deployment project template
24
+
25
+
The steps in this section vary depending on which version of Visual Studio you have installed. Make sure the version selector in the upper left of this page is set correctly.
26
+
27
+
::: moniker range="vs-2019"
28
+
29
+
### To install the setup and deployment project template for Visual Studio 2019
30
+
31
+
::: moniker-end
32
+
33
+
::: moniker range="<=vs-2017"
34
+
35
+
### To install the setup and deployment project template for Visual Studio 2017 and earlier
24
36
25
37
1. When you're connected to the Internet, in Visual Studio, choose **Tools** > **Extensions and Updates**.
Copy file name to clipboardExpand all lines: docs/ide/walkthrough-working-with-projects-and-solutions-cpp.md
+50-9Lines changed: 50 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Walkthrough: Working with Projects and Solutions (C++)"
3
-
ms.date: "09/14/2018"
3
+
ms.date: "04/25/2019"
4
4
helpviewer_keywords: ["solutions [C++]", "projects [C++], about projects", "projects [C++]", "solutions [C++], about solutions"]
5
5
ms.assetid: 93a3f290-e294-46e3-876e-e3084d9ae833
6
6
---
@@ -12,24 +12,63 @@ In Visual Studio, work is organized in projects and solutions. A solution can ha
12
12
13
13
## Before you start
14
14
15
-
To complete this walkthrough, you need Visual Studio 2017 version 15.3 or later. If you need a copy, here's a short guide: [Install C++ support in Visual Studio](../build/vscpp-step-0-installation.md). If you haven't done it yet, follow the next steps after installation through the "Hello, World" tutorial to make sure Visual C++ is installed correctly and it all works.
15
+
To complete this walkthrough, you need Visual Studio 2017 version 15.3 or later. If you need a copy, here's a short guide: [Install C++ support in Visual Studio](../build/vscpp-step-0-installation.md). If you haven't done it yet, follow the next steps after installation through the "Hello, World" tutorial to make sure Visual Studio is installed correctly and it all works.
16
16
17
17
It helps if you understand the fundamentals of the C++ language, and know what a compiler, linker, and debugger are used for. The tutorial also assumes that you're familiar with Windows and how to use menus, dialogs,
18
18
19
19
## Create a project
20
20
21
-
To create a project, first choose a project-type template. For each project type, Visual Studio sets compiler settings and—depending on the type—generates starter code that you can modify later.
21
+
To create a project, first choose a project-type template. For each project type, Visual Studio sets compiler settings and—depending on the type—generates starter code that you can modify later. The following steps vary depending on which version of Visual Studio you are using. Make sure the version selector in the upper left of this page is set to the correct version.
22
22
23
-
### To create a project
23
+
::: moniker range="vs-2019"
24
+
25
+
1. From the main menu, choose **File** > **New** > **Project** to open the **Create a New Project** dialog box.
26
+
27
+
1. At the top of the dialog, set **Language** to **C++**, set **Platform** to **Windows**, and set **Project type** to **Console**.
28
+
29
+
1. From the filtered list of project types, choose **Console App** then choose **Next**. In the next page, enter *Game* as the name for the project.
30
+
31
+
You can accept the default location in the **Location** drop-down list, enter a different location, or choose the **Browse** button to browse to a directory where you want to save the project.
32
+
33
+
When you create a project, Visual Studio puts the project in a solution. By default, the solution has the same name as the project. You can change the name in the **Solution name** box, but for this example, keep the default name.
34
+
35
+
1. Choose the **Create** button to create the project.
36
+
37
+
Visual Studio creates your new solution and project files, and opens the editor for the Game.cpp source code file it generated.
38
+
39
+
::: moniker-end
40
+
41
+
::: moniker range="vs-2017"
42
+
43
+
### To create a project in Visual Studio 2017
24
44
25
45
1. On the menu bar, choose **File** > **New** > **Project**.
26
46
27
47
1. In the left pane of the **New Project** dialog box, expand **Installed** and select **Visual C++**, if it isn't open already.
28
48
29
49
1. In the list of installed templates in the center pane, select **Windows Console Application**.
30
50
31
-
> [!NOTE]
32
-
> In previous versions of Visual Studio the installed template is called **Win32 Console Application**.
51
+
1. Enter a name for the project in the **Name** box. For this example, enter *Game*.
52
+
53
+
You can accept the default location in the **Location** drop-down list, enter a different location, or choose the **Browse** button to browse to a directory where you want to save the project.
54
+
55
+
When you create a project, Visual Studio puts the project in a solution. By default, the solution has the same name as the project. You can change the name in the **Solution name** box, but for this example, keep the default name.
56
+
57
+
1. Choose the **OK** button to create the project.
58
+
59
+
Visual Studio creates your new solution and project files, and opens the editor for the Game.cpp source code file it generated.
60
+
61
+
::: moniker-end
62
+
63
+
::: moniker range="vs-2015"
64
+
65
+
### To create a project in Visual Studio 2015
66
+
67
+
1. On the menu bar, choose **File** > **New** > **Project**.
68
+
69
+
1. In the left pane of the **New Project** dialog box, expand **Installed** and select **Visual C++**, if it isn't open already.
70
+
71
+
1. In the list of installed templates in the center pane, select **Win32 Console Application**.
33
72
34
73
1. Enter a name for the project in the **Name** box. For this example, enter *Game*.
35
74
@@ -41,6 +80,8 @@ To create a project, first choose a project-type template. For each project type
41
80
42
81
Visual Studio creates your new solution and project files, and opens the editor for the Game.cpp source code file it generated.
43
82
83
+
::: moniker-end
84
+
44
85
## Organize projects and files
45
86
46
87
You can use **Solution Explorer** to organize and manage the projects, files, and other resources in your solution.
@@ -107,7 +148,7 @@ This part of the walkthrough shows how to add a class to the project. When you a
#include"pch.h"// remove this line in Visual Studio 2019
111
152
#include"Cardgame.h"
112
153
#include<iostream>
113
154
@@ -145,7 +186,7 @@ Add some code to your app that tests the new functions.
145
186
// Game.cpp : Defines the entry point for the console application.
146
187
//
147
188
148
-
#include"pch.h"
189
+
#include"pch.h"// remove this line in Visual Studio 2019
149
190
#include"Cardgame.h"
150
191
#include<iostream>
151
192
@@ -190,7 +231,7 @@ Next, build the project and run the app.
190
231
191
232
The **Output** window can show different steps, depending on the build configuration, but if the project build succeeds, the last line should resemble the output shown.
192
233
193
-
If your build didn't succeed, compare your code to the code that is shown in the earlier steps.
234
+
If your build didn't succeed, compare your code to the code that is shown in the earlier steps.
194
235
195
236
1. To run the project, on the menu bar, choose **Debug** > **Start Without Debugging**. A console window should appear, and the output should resemble:
0 commit comments