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/includes/git-source-control.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
ms.date: 04/18/2024
2
+
ms.date: 12/04/2024
3
3
ms.subservice: general-ide
4
4
ms.custom: vs-get-started, devdivchpfy22
5
5
ms.author: ghogen
@@ -37,13 +37,13 @@ To associate your code with Git, start by creating a new Git repository where yo
37
37
## Use Git actions in Visual Studio
38
38
39
39
Here's a brief summary of Git actions available in the Visual Studio status bar:
40
-
41
-
- The **Up/Down** arrows show 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.
42
-
40
+
41
+
- The **Up/Down** arrows show 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.
42
+
43
43
- To view a specific commit, select the **Up/Down** arrow, and then select **View Outgoing/Incoming**.
44
44
45
45
- The **Pencil** shows the number of uncommitted changes to your code. You can select this icon to view those changes in the **Git Changes** window.
46
46
47
47
The **Git** menu provides tools for repository actions on your files. You can [use git fetch, pull, push, and sync for version control in Visual Studio](../../version-control/git-fetch-pull-sync.md).
48
48
49
-
To learn more about how to use Git with your app, see the [Visual Studio version control documentation](../../version-control/git-with-visual-studio.md).
49
+
For more information about how to use Git with your app, see [About Git in Visual Studio](../../version-control/git-with-visual-studio.md).
description: Create a Visual Basic console application in Visual Studio that asks the user for input and displays the value along with the current time.
4
4
ms.custom: vs-acquisition
5
-
ms.date: 11/17/2023
5
+
ms.date: 12/06/2024
6
6
ms.subservice: general-ide
7
-
8
7
ms.topic: tutorial
9
8
ms.devlang: vb
10
9
author: anandmeg
11
10
ms.author: meghaanand
12
11
manager: mijacobs
13
12
dev_langs:
14
13
- vb
15
-
# Customer intent: As a novice, I want to create my first app so that I see how Visual Basic works.
14
+
# Customer intent: As a novice, I want to create my first app so that I see how Visual Basic works in Visual Studio.
16
15
---
17
-
# Tutorial: Create a simple Visual Basic (VB) console app
16
+
# Tutorial: Create a simple Visual Basic console app
17
+
18
+
In this tutorial, you use Visual Studio to create a Visual Basic application. Visual Basic (VB) is an easy to learn type-safe programming language. This tutorial also explores some features of the [Visual Studio integrated development environment (IDE)](visual-studio-ide.md), including [source control in Git](/visualstudio/version-control).
18
19
19
-
This article shows how you use Visual Studio to create a simple Visual Basic application, a *console app*. In this app, you ask the user for their name, and then display it back with the current time. You also explore some features of the [Visual Studio integrated development environment (IDE)](visual-studio-ide.md), including [source control in Git](/visualstudio/version-control). Visual Basic is a type-safe programming language that's designed to be easy to learn. A console app takes input and displays output in a command-line window, also known as a console.
20
+
A *console app* takes input and displays output in a command-line window, also known as a console. The console app that you create asks the user for their name, and then displays it, along with the current time.
20
21
21
22
In this tutorial, you learn how to:
22
23
@@ -30,7 +31,7 @@ In this tutorial, you learn how to:
30
31
31
32
## Prerequisites
32
33
33
-
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta) page to install it for free.
34
+
-If you don't have Visual Studio, go to [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta) to install it for free.
34
35
35
36
## Create a project
36
37
@@ -49,18 +50,18 @@ First, you create a Visual Basic app project. The default project template inclu
49
50
50
51
1. In the start window, choose **Create a new project**.
51
52
52
-
:::image type="content" source="media/vs-2019/create-new-project-dark-theme.png" alt-text="Screenshot showing the Visual Studio start window with 'Create a new project' selected.":::
53
+
:::image type="content" source="media/vs-2019/create-new-project-dark-theme.png" alt-text="Screenshot showing the Visual Studio start window with 'Create a new project' selected." lightbox="media/vs-2019/create-new-project-dark-theme.png":::
53
54
54
-
1. In the **Create a new project** window, choose **Visual Basic** from the Language list. Next, choose **Windows** from the Platform list and **Console** from the project types list.
55
+
1. In the **Create a new project** window, choose **Visual Basic** from the language list. Next, choose **Windows** from the platform list and **Console** from the project types list.
55
56
56
57
After you apply the language, platform, and project type filters, choose the **Console Application** template, and then choose **Next**.
57
58
58
-
:::image type="content" source="media/vs-2019/vb-create-new-project-console-net-core.png" alt-text="Screenshot that shows how to choose the Visual Basic, Windows, and Console filter options and select the Console Application project template.":::
59
+
:::image type="content" source="media/vs-2019/vb-create-new-project-console-net-core.png" alt-text="Screenshot that shows how to choose the Visual Basic, Windows, and Console filter options and select the Console Application project template." lightbox="media/vs-2019/vb-create-new-project-console-net-core.png":::
59
60
60
61
> [!NOTE]
61
62
> 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.
62
63
>
63
-
> :::image type="content" source="media/vs-2019/not-finding-what-looking-for.png" alt-text="Screenshot showing the 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window.":::
64
+
> :::image type="content" source="media/vs-2019/not-finding-what-looking-for.png" alt-text="Screenshot showing the 'Install more tools and features' link in the 'Create new project' window.":::
64
65
>
65
66
> Then, in the Visual Studio Installer, choose the **.NET Core cross-platform development** workload.
66
67
>
@@ -88,16 +89,16 @@ First, you create a Visual Basic app project. The default project template inclu
88
89
89
90
:::image type="content" source="media/vs-2022/create-new-project-dark-theme.png" alt-text="Screenshot showing the Visual Studio start window with 'Create a new project' selected.":::
90
91
91
-
1. In the **Create a new project** window, choose **Visual Basic** from the Language list. Next, choose **Windows** from the Platform list and **Console** from the Project types list.
92
+
1. In the **Create a new project** window, choose **Visual Basic** from the language list. Next, choose **Windows** from the platform list and **Console** from the project types list.
92
93
93
94
After you apply the language, platform, and project type filters, choose the **Console App** template, and then choose **Next**.
94
95
95
-
:::image type="content" source="media/vs-2022/vb-create-new-project-console-net-core.png" alt-text="Screenshot that shows how to choose the Visual Basic, Windows, and Console filter options and select the Console Application project template.":::
96
+
:::image type="content" source="media/vs-2022/vb-create-new-project-console-net-core.png" alt-text="Screenshot that shows how to choose the Visual Basic, Windows, and Console filter options and select the Console Application project template." lightbox="media/vs-2022/vb-create-new-project-console-net-core.png":::
96
97
97
98
> [!NOTE]
98
99
> If you do not see the **Console App** 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.
99
100
>
100
-
> :::image type="content" source="media/vs-2022/not-finding-what-looking-for.png" alt-text="Screenshot showing the 'Install more tools and features' link from the 'Not finding what you're looking for' message in the 'Create new project' window.":::
101
+
> :::image type="content" source="media/vs-2022/not-finding-what-looking-for.png" alt-text="Screenshot showing the 'Install more tools and features' link in the 'Create new project' window.":::
101
102
>
102
103
> Then, in the Visual Studio Installer, choose the **.NET desktop development** workload.
103
104
>
@@ -127,25 +128,25 @@ There are two ways to run this code, inside Visual Studio in *debug mode*, and f
127
128
128
129
::: moniker range="vs-2019"
129
130
130
-
:::image type="content" source="media/vs-2019/vb-ide-default-code.png" alt-text="Screenshot showing the default 'Hello World!' code.":::
1. Select the **WhatIsYourName** button or press **F5** to run the default code in Debug mode.
133
134
134
-
:::image type="content" source="media/vs-2019/vb-ide-whatisyourname-button.png" alt-text="Screenshot showing the 'What Is Your Name' button highlighted in the Visual Studio toolbar.":::
135
+
:::image type="content" source="media/vs-2019/vb-ide-whatisyourname-button.png" alt-text="Screenshot showing the 'What Is Your Name' button highlighted in the Visual Studio toolbar." lightbox="media/vs-2019/vb-ide-whatisyourname-button.png":::
135
136
136
137
1. When the app runs in the Microsoft Visual Studio Debug Console, "Hello World!" displays. Press any key to close the debug console window and end the app:
137
138
138
-
:::image type="content" source="media/vs-2019/vb-console-hello-world-press-any-key.png" alt-text="Screenshot showing 'Hello World!' and the 'Press any key to close this window' messages.":::
139
+
:::image type="content" source="media/vs-2019/vb-console-hello-world-press-any-key.png" alt-text="Screenshot showing 'Hello World!' and the 'Press any key to close this window' messages." lightbox="media/vs-2019/vb-console-hello-world-press-any-key.png":::
139
140
140
141
::: moniker-end
141
142
142
143
::: moniker range=">=vs-2022"
143
144
144
-
:::image type="content" source="media/vs-2022/vb-ide-default-code.png" alt-text="Screenshot showing the default 'Hello World!' code.":::
1. Select the **WhatIsYourName** button or press **F5** to run the default code in Debug mode.
147
148
148
-
:::image type="content" source="media/vs-2022/vb-ide-whatisyourname-button.png" alt-text="Screenshot showing the 'What Is Your Name' button highlighted in the Visual Studio toolbar.":::
149
+
:::image type="content" source="media/vs-2022/vb-ide-whatisyourname-button.png" alt-text="Screenshot showing the 'What Is Your Name' button highlighted in the Visual Studio toolbar." lightbox="media/vs-2022/vb-ide-whatisyourname-button.png":::
149
150
150
151
1. When the app runs in the Microsoft Visual Studio Debug Console, "Hello World!" displays. Press any key to close the debug console window and end the app:
151
152
@@ -155,15 +156,15 @@ There are two ways to run this code, inside Visual Studio in *debug mode*, and f
155
156
156
157
### Run the app as a standalone
157
158
158
-
To see the output outside of Visual Studio, in a system console window, build and run the executable (.exe file).
159
+
To see the output outside of Visual Studio, in a system console window, build and run the executable (`.exe` file).
159
160
160
161
::: moniker range="vs-2019"
161
162
162
163
1. In the **Build** menu, choose **Build Solution**.
163
164
164
165
1. In **Solution Explorer**, right-click on **WhatIsYourName** and choose **Open File in File Explorer**.
165
166
166
-
1. In **File Explorer**, navigate to the **bin\Debug\net5.0** directory and run **WhatIsYourName.exe**.
167
+
1. In **File Explorer**, navigate to the *bin\Debug\net5.0* directory and run *WhatIsYourName.exe*.
167
168
168
169
1. The `Main` procedure terminates after its single statement executes and the console window closes immediately. To keep the console visible until the user presses a key, see the next section.
169
170
@@ -175,7 +176,7 @@ To see the output outside of Visual Studio, in a system console window, build an
175
176
176
177
1. In **Solution Explorer**, right-click on **WhatIsYourName** and choose **Open File in File Explorer**.
177
178
178
-
1. In **File Explorer**, navigate to the **bin\Debug\net8.0** directory and run **WhatIsYourName.exe**.
179
+
1. In **File Explorer**, navigate to the *bin\Debug\net8.0* directory and run *WhatIsYourName.exe*.
179
180
180
181
1. The `Main` procedure terminates after its single statement executes and the console window closes immediately. To keep the console visible until the user presses a key, see the next section.
181
182
@@ -203,7 +204,7 @@ Next, you add Visual Basic code that prompts you for your name and then displays
:::imagetype="content"source="media/vs-2019/vb-code-window-whatisyourname-dark.png"alt-text="Screenshot showing the code for the 'Program.vb' file in the 'WhatIsYourName' project loaded in the Visual Basic code editor.":::
207
+
:::imagetype="content"source="media/vs-2019/vb-code-window-whatisyourname-dark.png"alt-text="Screenshot showing the code for the 'Program.vb' file in the 'WhatIsYourName' project loaded in the Visual Basic code editor."lightbox="media/vs-2019/vb-code-window-whatisyourname-dark.png":::
0 commit comments