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/get-started/tutorial-projects-solutions.md
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ manager: jillfra
11
11
ms.workload:
12
12
- multiple
13
13
---
14
-
# Learn about projects and solutions
14
+
# Introduction to projects and solutions
15
15
16
16
In this introductory article, we'll explore what it means to create a *solution* and a *project* in Visual Studio. A solution is a container that's used to organize one or more related code projects, for example a class library project and a corresponding test project. We'll look at the properties of a project and some of the files it can contain. We'll also create a reference from one project to another.
17
17
@@ -44,11 +44,11 @@ We'll start our exploration by creating an empty solution. After you get to know
44
44
45
45
1. Open Visual Studio.
46
46
47
-
1. On the top menu bar, choose**File** > **New** > **Project**.
47
+
1. On the top menu bar, select**File** > **New** > **Project**.
48
48
49
49
The **New Project** dialog box opens.
50
50
51
-
1. In the left pane, expand **Other Project Types**, then choose**Visual Studio Solutions**. In the center pane, choose the **Blank Solution** template. Name your solution **QuickSolution**, then choose the **OK** button.
51
+
1. In the left pane, expand **Other Project Types**, then select**Visual Studio Solutions**. In the center pane, select the **Blank Solution** template. Name your solution **QuickSolution**, then select the **OK** button.
52
52
53
53

54
54
@@ -60,16 +60,16 @@ We'll start our exploration by creating an empty solution. After you get to know
60
60
61
61
1. Open Visual Studio.
62
62
63
-
2. On the start window, choose**Create a new project**.
63
+
2. On the start window, select**Create a new project**.
64
64
65
-
3. On the **Create a new project** page, enter **blank solution** into the search box, select the **Blank Solution** template, and then choose**Next**.
65
+
3. On the **Create a new project** page, enter **blank solution** into the search box, select the **Blank Solution** template, and then select**Next**.
66
66
67
67

68
68
69
69
> [!TIP]
70
70
> If you have several workloads installed, the **Blank Solution** template might not appear at the top of your list of search results. Try scrolling to the **Other results based on your search** section of the list. It should appear there.
71
71
72
-
4. Name the solution **QuickSolution**, and then choose**Create**.
72
+
4. Name the solution **QuickSolution**, and then select**Create**.
73
73
74
74
A solution appears in **Solution Explorer** on the right-hand side of the Visual Studio window. You'll probably use **Solution Explorer** often, to browse the contents of your projects.
75
75
@@ -81,39 +81,39 @@ Now let's add our first project to the solution. We'll start with an empty proje
81
81
82
82
::: moniker range="vs-2017"
83
83
84
-
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, choose**Add** > **New Project**.
84
+
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, select**Add** > **New Project**.
85
85
86
86
The **Add New Project** dialog box opens.
87
87
88
-
1. In the left pane, expand **Visual C#** and choose**Windows Desktop**. Then, in the middle pane, choose the **Empty Project (.NET Framework)** template. Name the project **QuickDate**, then choose**OK**.
88
+
1. In the left pane, expand **Visual C#** and select**Windows Desktop**. Then, in the middle pane, select the **Empty Project (.NET Framework)** template. Name the project **QuickDate**, then select**OK**.
89
89
90
90
A project named QuickDate appears beneath the solution in **Solution Explorer**. Currently it contains a single file called *App.config*.
91
91
92
92
> [!NOTE]
93
-
> If you don't see **Visual C#** in the left pane of the dialog box, you must install the **.NET desktop development** Visual Studio workload. Visual Studio uses workload-based installation to install only the components you need for the type of development you do. An easy way to install a new workload is to choose the **Open Visual Studio Installer** link in the bottom left corner of the **Add New Project** dialog box. After Visual Studio Installer launches, choose the **.NET desktop development** workload and then the **Modify** button.
93
+
> If you don't see **Visual C#** in the left pane of the dialog box, you must install the **.NET desktop development** Visual Studio workload. Visual Studio uses workload-based installation to install only the components you need for the type of development you do. An easy way to install a new workload is to select the **Open Visual Studio Installer** link in the bottom left corner of the **Add New Project** dialog box. After Visual Studio Installer launches, select the **.NET desktop development** workload and then the **Modify** button.
94
94
>
95
95
> 
96
96
97
97
::: moniker-end
98
98
99
99
::: moniker range=">=vs-2019"
100
100
101
-
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, choose**Add** > **New Project**.
101
+
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, select**Add** > **New Project**.
102
102
103
103
A dialog box opens that says **Add a new project**.
104
104
105
105
1. Enter the text **empty** into the search box at the top, and then select **C#** under **Language**.
106
106
107
-
1. Select the **Empty Project (.NET Framework)** template, and then choose**Next**.
107
+
1. Select the **Empty Project (.NET Framework)** template, and then select**Next**.
108
108
109
-
1. Name the project **QuickDate**, then choose**Create**.
109
+
1. Name the project **QuickDate**, then select**Create**.
110
110
111
111
A project named QuickDate appears beneath the solution in **Solution Explorer**. Currently it contains a single file called *App.config*.
112
112
113
113
> [!NOTE]
114
114
> If you don't see the **Empty Project (.NET Framework)** template, you must install the **.NET desktop development** Visual Studio workload. Visual Studio uses workload-based installation to install only the components you need for the type of development you do.
115
115
>
116
-
>An easy way to install a new workload when you're creating a new project is to choose the **Install more tools and features** link under the text that says **Not finding what you're looking for?**. After Visual Studio Installer launches, choose the **.NET desktop development** workload and then the **Modify** button.
116
+
>An easy way to install a new workload when you're creating a new project is to select the **Install more tools and features** link under the text that says **Not finding what you're looking for?**. After Visual Studio Installer launches, select the **.NET desktop development** workload and then the **Modify** button.
117
117
>
118
118
> 
119
119
@@ -123,11 +123,11 @@ Now let's add our first project to the solution. We'll start with an empty proje
123
123
124
124
We have an empty project. Let's add a code file.
125
125
126
-
1. From the right-click or context menu of the **QuickDate** project in **Solution Explorer**, choose**Add** > **New Item**.
126
+
1. From the right-click or context menu of the **QuickDate** project in **Solution Explorer**, select**Add** > **New Item**.
127
127
128
128
The **Add New Item** dialog box opens.
129
129
130
-
1. Expand **Visual C# Items**, then choose**Code**. In the middle pane, choose the **Class** item template. Name the class **Calendar**, and then choose the **Add** button.
130
+
1. Expand **Visual C# Items**, then select**Code**. In the middle pane, select the **Class** item template. Name the class **Calendar**, and then select the **Add** button.
131
131
132
132
A file named *Calendar.cs* is added to the project. The *.cs* on the end is the file extension that is given to C# code files. The file appears in the visual project hierarchy in **Solution Explorer**, and its contents are opened in the editor.
133
133
@@ -163,11 +163,11 @@ It is common for solutions to contain more than one project, and often these pro
163
163
164
164
Let's add a unit test project to our solution. This time we'll start from a project template so we don't have to add an additional code file to the project.
165
165
166
-
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, choose**Add** > **New Project**.
166
+
1. From the right-click or context menu of **Solution 'QuickSolution'** in **Solution Explorer**, select**Add** > **New Project**.
167
167
168
168
::: moniker range="vs-2017"
169
169
170
-
2. In the left pane, expand **Visual C#** and choose the **Test** category. In the middle pane, choose the **MSTest Test Project (.NET Core)** project template. Name the project **QuickTest**, and then choose**OK**.
170
+
2. In the left pane, expand **Visual C#** and select the **Test** category. In the middle pane, select the **MSTest Test Project (.NET Core)** project template. Name the project **QuickTest**, and then select**OK**.
171
171
172
172
A second project is added to **Solution Explorer**, and a file named *UnitTest1.cs* opens in the editor.
173
173
@@ -179,9 +179,9 @@ Let's add a unit test project to our solution. This time we'll start from a proj
179
179
180
180
2. In the **Add a new project** dialog box, enter the text **unit test** into the search box at the top, and then select **C#** under **Language**.
181
181
182
-
3.Choose the **MSTest Test Project (.NET Core)** project template, and then choose**Next**.
182
+
3.Select the **MSTest Test Project (.NET Core)** project template, and then select**Next**.
183
183
184
-
4. Name the project **QuickTest**, and then choose**Create**.
184
+
4. Name the project **QuickTest**, and then select**Create**.
185
185
186
186
A second project is added to **Solution Explorer**, and a file named *UnitTest1.cs* opens in the editor.
187
187
@@ -195,30 +195,30 @@ We're going to use the new unit test project to test our method in the **QuickDa
195
195
196
196
::: moniker range="vs-2017"
197
197
198
-
1.Choose the **Dependencies** node in the **QuickTest** project, and from the right-click or context menu, choose**Add Reference**.
198
+
1.Select the **Dependencies** node in the **QuickTest** project, and from the right-click or context menu, select**Add Reference**.
199
199
200
200
The **Reference Manager** dialog box opens.
201
201
202
-
1. In the left pane, expand **Projects** and choose**Solution**. In the middle pane, choose the checkbox next to **QuickDate**, and then choose**OK**.
202
+
1. In the left pane, expand **Projects** and select**Solution**. In the middle pane, select the checkbox next to **QuickDate**, and then select**OK**.
203
203
204
204
A reference to the **QuickDate** project is added.
205
205
206
-

206
+

207
207
208
208
::: moniker-end
209
209
210
210
::: moniker range="vs-2019"
211
211
212
-
1.Choose the **Dependencies** node in the **QuickTest** project, and from the right-click or context menu, choose**Add Project Reference...**.
212
+
1.Select the **Dependencies** node in the **QuickTest** project, and from the right-click or context menu, select**Add Project Reference...**.
213
213
214
214
The **Reference Manager** dialog box opens.
215
215
216
-
1. In the left pane, expand **Projects** and choose **Solution**. In the middle pane, choose the checkbox next to **QuickDate**, and then choose**OK**.
216
+
1. In the left pane, expand **Projects**, and then select **Solution**. In the middle pane, select the checkbox next to **QuickDate**, and then select**OK**.
217
217
218
218
A reference to the **QuickDate** project is added.
219
219
220
-

221
-
220
+

221
+
222
222
::: moniker-end
223
223
224
224
## Add test code
@@ -271,7 +271,7 @@ The line in the *Calendar.cs* file that contains the <xref:System.Runtime.Compil
271
271
272
272
## Next steps
273
273
274
-
If you want to check that your unit test is working, choose**Test** > **Run** > **All Tests** from the menu bar. A window called **Test Explorer** opens, and you should see that the **TestGetCurrentDate** test passes.
274
+
If you want to check that your unit test is working, select**Test** > **Run** > **All Tests** from the menu bar. A window called **Test Explorer** opens, and you should see that the **TestGetCurrentDate** test passes.
275
275
276
276

277
277
@@ -291,7 +291,7 @@ If you want to check that your unit test is working, choose **Test** > **Run** >
291
291
292
292
## See also
293
293
294
-
-[Create projects and solutions](../ide/creating-solutions-and-projects.md)
294
+
-[Work with projects and solutions](../ide/creating-solutions-and-projects.md)
295
295
-[Manage project and solution properties](../ide/managing-project-and-solution-properties.md)
296
296
-[Manage references in a project](../ide/managing-references-in-a-project.md)
297
297
-[Develop code in Visual Studio without projects or solutions](../ide/develop-code-in-visual-studio-without-projects-or-solutions.md)
Copy file name to clipboardExpand all lines: docs/ide/solutions-and-projects-in-visual-studio.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Solutions and projects overview
2
+
title: Learn about solutions and projects
3
3
description: Learn about Visual Studio projects and solutions, how to create new projects from a template, and how to view & manage projects in Solution Explorer.
4
4
ms.custom: SEO-VS-2020
5
5
ms.date: 12/15/2020
@@ -45,7 +45,7 @@ Project files are based on the [MSBuild XML schema](../msbuild/msbuild-project-f
45
45
46
46
## Solutions
47
47
48
-
A project is contained within a *solution*. Despite its name, a solution is not an "answer". It's simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with a particular project. A solution is described by a text file (extension *.sln*) with its own unique format; it's not intended to be edited by hand.
48
+
A project is contained within a *solution*. Despite its name, a solution is not an "answer". It's simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with a particular project.
49
49
50
50
### Solution file
51
51
@@ -56,6 +56,9 @@ Visual Studio uses two file types (*.sln* and *.suo*) to store settings for solu
56
56
|.sln|Visual Studio Solution|Organizes projects, project items, and solution items in the solution.|
57
57
|.suo|Solution User Options|Stores user-level settings and customizations, such as breakpoints.|
58
58
59
+
> [!IMPORTANT]
60
+
> A solution is described by a text file (extension *.sln*) with its own unique format; it's not intended to be edited by hand. Conversely, the *.suo* file is a hidden file that is not displayed under the default File Explorer settings. To show hidden files, on the **View** menu in File Explorer, select the **Hidden Items** checkbox.
61
+
59
62
### Solution folder
60
63
61
64
A "solution folder" is a virtual folder that's only in **Solution Explorer**, where you can use it to group projects in a solution. If you want to locate a solution file on a computer, go to **Tools** > **Options** > **Projects and Solutions** > **Locations**. For more information, see [Options dialog box: Projects and Solutions > Locations](./reference/projects-solutions-locations-options.md).
0 commit comments