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/csharp/tutorial-console.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Tutorial: Create a simple C# console app "
3
3
description: "Learn how to create a C# console app in Visual Studio, step-by-step."
4
4
ms.custom: "vs-acquisition, get-started"
5
-
ms.date: 02/10/2021
5
+
ms.date: 08/12/2021
6
6
ms.technology: vs-ide-general
7
7
ms.prod: visual-studio-windows
8
8
ms.topic: tutorial
@@ -98,7 +98,7 @@ If you don't see the **Console App (.NET Core)** project template, you can get i
98
98
99
99

100
100
101
-
1. In the **Create a new project** window, choose **C#** from the Language list. Next, choose **Windows** from the Platform list and **Console** from the project types list.
101
+
1. In the **Create a new project** window, choose **C#** from the Language list. Next, choose **Windows** from the Platform list and **Console** from the project types list.
102
102
103
103
After you apply the language, platform, and project type filters, choose the **Console Application** template, and then choose **Next**.
104
104
@@ -107,8 +107,8 @@ If you don't see the **Console App (.NET Core)** project template, you can get i
107
107
> [!NOTE]
108
108
> If you do not see the **Console Application** template, you can install it from the **Create a new project** window. In the **Not finding what you're looking for?** message, choose the **Install more tools and features** link.
109
109
>
110
-
> 
111
-
>
110
+
> 
111
+
>
112
112
> Then, in the Visual Studio Installer, choose the **.NET Core cross-platform development** workload.
113
113
>
114
114
> 
@@ -118,7 +118,7 @@ If you don't see the **Console App (.NET Core)** project template, you can get i
118
118
1. In the **Configure your new project** window, type or enter *Calculator* in the **Project name** box. Then, choose **Next**.
119
119
120
120
:::image type="content" source="./media/vs-2019/csharp-name-your-calculator-project.png" alt-text="in the 'Configure your new project' window, name your project 'Calculator'":::
121
-
121
+
122
122
1. In the **Additional information** window, **.NET Core 3.1** should already be selected for your target framework. If not, select **.NET Core 3.1**. Then, choose **Create**.
123
123
124
124
:::image type="content" source="./media/vs-2019/csharp-target-framework.png" alt-text="in the 'In the 'Additional information' window, make sure .NET Core 3.1 is selected":::
Now that you've created your app, you might want to add it to a Git repository. We've got you covered; Visual Studio makes that process easy with Git tools you can use directly from the IDE.
15
+
16
+
> [!TIP]
17
+
> Git is the most widely used modern version control system, so whether you're a professional developer or if you're learning how to code, Git can be very useful to you. If you are new to Git, the [https://git-scm.com/](https://git-scm.com/) website is a good place to start. There, you’ll find cheat sheets, a popular online book, and Git Basics videos.
18
+
19
+
To associate your code with Git, you start by creating a new Git repository where your code is located. Here's how.
20
+
21
+
1. In the status bar at the bottom-right corner of Visual Studio, select the **Add to Source Control** button, and then select **Git**.
22
+
23
+
:::image type="content" source="../media/vs-2022/git-add-source-control.png" alt-text="Screenshot of the Git source control buttons below the Solution Explorer pane, with the Add to Source Control button highlighted.":::
24
+
25
+
1. In the **Create a Git repository** dialog box, sign in to GitHub.
26
+
27
+
:::image type="content" source="../media/vs-2022/git-create-repo.png" alt-text="Screenshot of the Create a Git Repository dialog window where you can sign in to GitHub.":::
28
+
29
+
The repository name is auto-populated based on your folder location. By default, your new repository is private, which means you're the only one who can access it.
30
+
31
+
> [!TIP]
32
+
> Whether your repository is public or private, it's best to have a remote backup of your code stored securely on GitHub even if you aren't working with a team. This also makes your code available to you no matter what computer you're using.
33
+
34
+
1. Select **Create and Push**.
35
+
36
+
After you've created your repository, you'll see status details in the status bar.
37
+
38
+
:::image type="content" source="../media/vs-2022/git-new-private-repo-status-details.png" alt-text="Screenshot of the repo status bar that's below the Solution Explorer pane in Visual Studio.":::
39
+
40
+
The first icon with the arrows shows how many outgoing/incoming commits are in your current branch. You can use this icon to pull any incoming commits or push any outgoing commits. You can also chose to view these commits first, too. To do so, click the icon, and then select **View Outgoing/Incoming**.
41
+
42
+
The second icon with the pencil shows the number of uncommitted changes to your code. You can click this icon to view those changes in the **Git Changes** window.
43
+
44
+
To learn more about how to use Git with your app, see the [Visual Studio version control documentation](../../version-control/index.yml) page.
0 commit comments