Skip to content

Commit d2d355e

Browse files
authored
Merge pull request #2181 from TerryGLee/tglee-vsdownload
update the download link in two tutorials
2 parents 6692a0a + f6538ff commit d2d355e

File tree

2 files changed

+60
-42
lines changed

2 files changed

+60
-42
lines changed

docs/ide/tutorial-csharp-aspnet-core.md

Lines changed: 54 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,74 @@ ms.workload:
1616
- "aspnet"
1717
- "dotnetcore"
1818
---
19-
2019
# Get started with C# and ASP.NET in Visual Studio
20+
2121
In this tutorial for C# development with ASP.NET Core using Visual Studio, you'll create a C# ASP.NET Core web app, add code to it, explore some features of the IDE, and run the app.
2222

23-
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://aka.ms/vsdownload?utm_source=mscom&utm_campaign=msdocs) page to install it for free.
23+
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://www.visualstudio.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=button+cta&utm_content=download+vs2017) page to install it for free.
2424

2525
## Before you begin
26+
2627
Here's a quick FAQ to introduce you to some key concepts.
28+
2729
### What is C#?
30+
2831
[C#](/dotnet/csharp/getting-started/introduction-to-the-csharp-language-and-the-net-framework) is a type-safe and object-oriented programming language that's designed to be both robust and easy to learn.
32+
2933
### What is ASP.NET Core?
34+
3035
ASP.NET Core is an open-source and cross-platform framework for building internet-connected applications, such as web apps and services. ASP.NET Core apps can run on either .NET Core or the .NET Framework. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac, and Linux. ASP.NET Core is open source at [GitHub](https://github.com/aspnet/home).
36+
3137
### What is Visual Studio?
38+
3239
Visual Studio is an integrated development suite of productivity tools for developers. Think of it as a program you can use to create programs and applications.
3340

3441
## Start developing
42+
3543
Ready to start developing? Let's go!
3644

3745
### Create a project
46+
3847
First, you'll create a ASP.NET Core project. The project type comes with all the template files you'll need, before you've even added anything.
3948

4049
1. Open Visual Studio 2017.
4150

4251
2. From the top menu bar, choose **File** > **New** > **Project**.
4352

44-
3. In the **New Project** dialog box in the left pane, expand **Visual C#**, expand **Web**, and then choose **.NET Core**. In the middle pane, choose **ASP.NET Core Web Application**, name the file *MyCoreApp*, and then choose **OK**.
53+
3. In the **New Project** dialog box in the left pane, expand **Visual C#**, expand **Web**, and then choose **.NET Core**. In the middle pane, choose **ASP.NET Core Web Application**, name the file *MyCoreApp*, and then choose **OK**.
4554

4655
![ASP.NET Core Web Application project template in the New Project dialog box in the Visual Studio IDE](../ide/media/new-project-csharp-aspnet-mycoreapp.png)
4756

4857
#### Add a workload (optional)
58+
4959
If you don't see the **ASP.NET Core Web Application** project template, you can get it by adding the **ASP.NET and web development** workload. You can add this workload in one of the two following ways, depending on which Visual Studio 2017 updates are installed on your machine.
5060

5161
##### Option 1: Use the New Project dialog box
62+
5263
1. Click the **Open Visual Studio Installer** link in the left pane of the **New Project** dialog box.
5364

54-
![Click the Open Visual Studio Installer link from the New Project dialog box](../ide/media/vs-open-visual-studio-installer-generic.png)
65+
![Click the Open Visual Studio Installer link from the New Project dialog box](../ide/media/vs-open-visual-studio-installer-generic.png)
5566

5667
2. The Visual Studio Installer launches. Choose the **ASP.NET and web development** workload, and then choose **Modify**.
5768

5869
![.NET Core cross-platform development workload in the Visual Studio Installer](../ide/media/asp-dot-net-web-dev-workload.png)
5970

6071
##### Option 2: Use the Tools menu bar
72+
6173
1. Cancel out of the **New Project** dialog box and from the top menu bar, choose **Tools** > **Get Tools and Features**.
6274

63-
2. The Visual Studio Installer launches. Choose the **ASP.NET and web development** workload, and then choose **Modify**.
75+
2. The Visual Studio Installer launches. Choose the **ASP.NET and web development** workload, and then choose **Modify**.
6476

6577
#### Add a project template
78+
6679
1. In the **New ASP.NET Core Web Application** dialog box, choose the **Web Application (Model-View-Controller)** project template.
6780

6881
2. Select **ASP.NET Core 2.0** from the top drop-down menu. (If you don't see **ASP.NET Core 2.0** in the list, install it by following the **Download** link that should appear in a yellow bar near the top of the dialog box.) Choose **OK**.
6982

7083
![New ASP.NET Core Web Application dialog box](../ide/media/new-project-csharp-aspnet-web-app-mvc.png)
7184

7285
### About your solution
86+
7387
This solution follows the Model-View-Controller (MVC) architectural pattern that separates an app into three main components:
7488

7589
* **Models** include classes that represent the data of the app. The model classes use validation logic to enforce business rules for that data. Typically, model objects retrieve and store model state in a database.
@@ -79,87 +93,88 @@ This solution follows the Model-View-Controller (MVC) architectural pattern that
7993
The MVC pattern helps you create apps that are easier to test and update than traditional monolithic apps.
8094

8195
### Tour your solution
82-
1. The project template creates a solution with a single ASP.NET Core project that is named **MyCoreApp**. Expand the project node to expose its contents.
96+
97+
1. The project template creates a solution with a single ASP.NET Core project that is named **MyCoreApp**. Expand the project node to expose its contents.
8398

8499
![ASP.NET Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-mycoreapp.png)
85100

86-
1. Open the *HomeController.cs* file from the **Controllers** folder.
101+
2. Open the *HomeController.cs* file from the **Controllers** folder.
87102

88-
![HomeController.cs file in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-home-controller.png)
103+
![HomeController.cs file in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-home-controller.png)
89104

90-
2. View the *HomeController.cs*
105+
3. View the *HomeController.cs*
91106

92-
![HomeController.cs in the Visual Studio code window](../ide/media/csharp-aspnet-home-controller-code.png)
107+
![HomeController.cs in the Visual Studio code window](../ide/media/csharp-aspnet-home-controller-code.png)
93108

94-
4. The project also has a **Views** folder that contains other folders that map to each controller (as well as one for **Shared** views). For example, the view CSHTML file (an extension of HTML) for the */Home/About* path would be at *Views/Home/About.cshtml*. Open that file.
109+
4. The project also has a **Views** folder that contains other folders that map to each controller (as well as one for **Shared** views). For example, the view CSHTML file (an extension of HTML) for the */Home/About* path would be at *Views/Home/About.cshtml*. Open that file.
95110

96-
![About.cshtml file in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-view-about.png)
111+
![About.cshtml file in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-view-about.png)
97112

98-
5. This CSHTML file uses the Razor syntax to render HTML based on a combination of standard tags and inline C#.
113+
5. This CSHTML file uses the Razor syntax to render HTML based on a combination of standard tags and inline C#.
99114

100-
![About.cshtml in the Visual Studio code window](../ide/media/csharp-aspnet-about-cshtml-code.png)
115+
![About.cshtml in the Visual Studio code window](../ide/media/csharp-aspnet-about-cshtml-code.png)
101116

102-
>[!NOTE]
103-
> To learn more about this, see the [Get started with C# and ASP.NET using the Razor syntax](/aspnet/web-pages/overview/getting-started/introducing-razor-syntax-c) page.
117+
>[!NOTE]
118+
> To learn more about this, see the [Get started with C# and ASP.NET using the Razor syntax](/aspnet/web-pages/overview/getting-started/introducing-razor-syntax-c) page.
104119
105-
6. The solution also contains a *wwwroot* folder that is the root for your web site. You can put static site content, such as CSS, images, and JavaScript libraries, directly at the paths you'd want them to be at when the site is deployed.
120+
6. The solution also contains a *wwwroot* folder that is the root for your web site. You can put static site content, such as CSS, images, and JavaScript libraries, directly at the paths you'd want them to be at when the site is deployed.
106121

107-
![wwwroot folder in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-wwwroot.png)
122+
![wwwroot folder in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-wwwroot.png)
108123

109-
7. There are also a variety of configuration files that serve to manage the project, its packages, and the application at runtime. For example, the default application [configuration](/aspnet/core/fundamentals/configuration) is stored in *appsettings.json*. However, you can override some/all of these settings on a per-environment basis, such as by providing an *appsettings.Development.json* file for the **Development** environment.
124+
7. There are also a variety of configuration files that serve to manage the project, its packages, and the application at runtime. For example, the default application [configuration](/aspnet/core/fundamentals/configuration) is stored in *appsettings.json*. However, you can override some/all of these settings on a per-environment basis, such as by providing an *appsettings.Development.json* file for the **Development** environment.
110125

111-
![Configuration files in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-config-files.png)
126+
![Configuration files in the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-config-files.png)
112127

113128
## Run and debug the application
114129

115130
1. Choose the **IIS Express** button in the IDE to build and run the app in Debug mode. (Alternatively, press **F5**, or choose **Debug > Start Debugging** from the menu bar.)
116131

117-
![Click the IIS Express button in Visual Studio](../ide/media/csharp-aspnet-iis-express-button.png)
132+
![Click the IIS Express button in Visual Studio](../ide/media/csharp-aspnet-iis-express-button.png)
118133

119134
> [!NOTE]
120135
> If you get an error message that says **Unable to connect to web server 'IIS Express'**, close Visual Studio and then open it by using the **Run as administrator** option from the right-click or context menu. Then, run the application again.
121136
122-
1. Visual Studio launches a browser window. Select **About**.
137+
2. Visual Studio launches a browser window. Select **About**.
123138

124-
![Select About in the browser window for your app](../ide/media/csharp-aspnet-browser-page.png)
139+
![Select About in the browser window for your app](../ide/media/csharp-aspnet-browser-page.png)
125140

126141
Among other things, the **About** page in the browser renders the text that is set in the *HomeController.cs* file.
127142

128143
![View the text on the About page](../ide/media/csharp-aspnet-browser-page-about.png)
129144

130-
1. Keep the browser window open and return to Visual Studio. Open *Controllers/HomeController.cs* if it's not already open.
145+
3. Keep the browser window open and return to Visual Studio. Open *Controllers/HomeController.cs* if it's not already open.
131146

132-
![Open the HomeController.cs file from the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-home-controller.png)
147+
![Open the HomeController.cs file from the Solution Explorer in Visual Studio](../ide/media/csharp-aspnet-solution-explorer-home-controller.png)
133148

134-
1. Set a breakpoint in the first line of the **About** method. To do this, click in the margin or set the cursor on the line and press **F9**.
149+
4. Set a breakpoint in the first line of the **About** method. To do this, click in the margin or set the cursor on the line and press **F9**.
135150

136151
This line sets some data in the **ViewData** collection that is rendered in the CSHTML page at *Views/Home/About.cshtml*.
137152

138-
![Set a breakpoint in the first line of the About method in About.cshtml. ](../ide/media/csharp-aspnet-home-controller-code-set-breakpoint.png)
153+
![Set a breakpoint in the first line of the About method in About.cshtml. ](../ide/media/csharp-aspnet-home-controller-code-set-breakpoint.png)
139154

140-
1. Return to the browser and refresh the **About** page. This will trigger the breakpoint in Visual Studio.
155+
5. Return to the browser and refresh the **About** page. This will trigger the breakpoint in Visual Studio.
141156

142-
1. In Visual Studio, mouse over the **ViewData** member to view its data.
157+
6. In Visual Studio, mouse over the **ViewData** member to view its data.
143158

144-
![View the ViewData member of the About method to see more info](../ide/media/csharp-aspnet-home-controller-view-breakpoint-info.png)
159+
![View the ViewData member of the About method to see more info](../ide/media/csharp-aspnet-home-controller-view-breakpoint-info.png)
145160

146-
1. Remove the application breakpoint using the same method you used to add it.
161+
7. Remove the application breakpoint using the same method you used to add it.
147162

148-
1. Open *Views/Home/About.cshtml*.
163+
8. Open *Views/Home/About.cshtml*.
149164

150-
![Select About.cshtml in the Solution Explorer](../ide/media/csharp-aspnet-solution-explorer-view-about.png)
165+
![Select About.cshtml in the Solution Explorer](../ide/media/csharp-aspnet-solution-explorer-view-about.png)
151166

152-
1. Change the text **"additional"** to **"changed"** and save the file.
167+
9. Change the text **"additional"** to **"changed"** and save the file.
153168

154-
![Change the text that reads "additional" to text that reads "changed"](../ide/media/csharp-aspnet-about-cshtml-code-change.png)
169+
![Change the text that reads "additional" to text that reads "changed"](../ide/media/csharp-aspnet-about-cshtml-code-change.png)
155170

156-
1. Return to the browser window to see the updated text. (Refresh the browser if you don't see the text that you changed.)
171+
10. Return to the browser window to see the updated text. (Refresh the browser if you don't see the text that you changed.)
157172

158-
![Refresh the browser window to see your changed text](../ide/media/csharp-aspnet-browser-page-about-changed.png)
173+
![Refresh the browser window to see your changed text](../ide/media/csharp-aspnet-browser-page-about-changed.png)
159174

160-
1. Choose the **Stop Debugging** button from the toolbar to stop debugging. (Alternatively, press **Shift**+**F5**, or choose **Debug** > **Stop Debugging** from the menu bar.)
175+
11. Choose the **Stop Debugging** button from the toolbar to stop debugging. (Alternatively, press **Shift**+**F5**, or choose **Debug** > **Stop Debugging** from the menu bar.)
161176

162-
![Click the Stop Debugging button on the toolbar](../ide/media/csharp-aspnet-stop-debugging.png)
177+
![Click the Stop Debugging button on the toolbar](../ide/media/csharp-aspnet-stop-debugging.png)
163178

164179
## Next steps
165180

docs/ide/tutorial-visual-basic-console.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ dev_langs:
1515
ms.workload:
1616
- "multiple"
1717
---
18-
1918
# Get started with Visual Basic in Visual Studio
2019

2120
In this tutorial for Visual Basic (VB), you'll use Visual Studio to create and run a few different console apps, and explore some features of the [Visual Studio integrated development environment (IDE)](visual-studio-ide.md) while you do so.
2221

23-
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://aka.ms/vsdownload?utm_source=mscom&utm_campaign=msdocs) page to install it for free.
22+
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://www.visualstudio.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=button+cta&utm_content=download+vs2017) page to install it for free.
2423

2524
## Before you begin
2625

@@ -59,9 +58,11 @@ First, we'll create a Visual Basic application project. The project type comes w
5958
![Console App (.NET Core) project template in the New Project dialog box in the Visual Studio IDE](../ide/media/new-project-vb-dotnetcore-whatisyourname-console-app.png)
6059

6160
#### Add a workgroup (optional)
61+
6262
If you don't see the **Console App (.NET Core)** project template, you can get it by adding the **.NET Core cross-platform development** workload. You can add this workload in one of the two following ways, depending on which Visual Studio 2017 updates are installed on your machine.
6363

6464
##### Option 1: Use the New Project dialog box
65+
6566
1. Click the **Open Visual Studio Installer** link in the left pane of the **New Project** dialog box.
6667

6768
![Click the Open Visual Studio Installer link from the New Project dialog box](../ide/media/vs-open-visual-studio-installer-generic.png)
@@ -71,9 +72,10 @@ If you don't see the **Console App (.NET Core)** project template, you can get i
7172
![.NET Core cross-platform development workload in the Visual Studio Installer](../ide/media/dot-net-core-xplat-dev-workload.png)
7273

7374
##### Option 2: Use the Tools menu bar
75+
7476
1. Cancel out of the **New Project** dialog box and from the top menu bar, choose **Tools** > **Get Tools and Features**.
7577

76-
2. The Visual Studio Installer launches. Choose the **.NET Core cross-platform development** workload, and then choose **Modify**.
78+
2. The Visual Studio Installer launches. Choose the **.NET Core cross-platform development** workload, and then choose **Modify**.
7779

7880
## Create a "What Is Your Name" application
7981

@@ -103,6 +105,7 @@ Let's create an app that prompts you for your name and then displays it along wi
103105
5. Press any key to close the console window.
104106

105107
## Create a "Calculate This" application
108+
106109
1. Open Visual Studio 2017, and then from the top menu bar, choose **File** > **New** > **Project**.
107110

108111
2. In the **New Project** dialog box in the left pane, expand **Visual Basic**, and then choose **.NET Core**. In the middle pane, choose **Console App (.NET Core)**. Then name the file *CalculateThis*.

0 commit comments

Comments
 (0)