Skip to content

Commit 3bd8800

Browse files
author
Ron Petrusha
authored
Merge pull request dotnet#2793 from rpetrusha/vs-code
Revised C# Visual Studio Code tutorial for .NET Core 2.0
2 parents 318bf7a + 26e2440 commit 3bd8800

18 files changed

+19
-96
lines changed

.openpublishing.redirection.json

+5
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,11 @@
886886
"source_path": "fsharp/tutorials/getting-started/getting-started-command-line.md",
887887
"redirect_url": "/dotnet/fsharp/get-started/get-started-command-line",
888888
"redirect_document_id": true
889+
},
890+
{
891+
"source_path": "docs/csharp/getting-started/with-visual-studio-code.md",
892+
"redirect_url": "/dotnet/core/tutorials/with-visual-studio-code",
893+
"redirect_document_id": true
889894
}
890895
]
891896
}

docs/core/tutorials/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following tutorials are available for learning about .NET Core.
2828

2929
## Building applications with Visual Studio Code
3030

31-
- [Getting Started with C# using Visual Studio Code](../../csharp/getting-started/with-visual-studio-code.md)
31+
- [Getting Started with C# and Visual Studio Code](with-visual-studio-code.md)
3232
- [Getting started with .NET Core on macOS](using-on-macos.md)
3333

3434
## Building applications with Visual Studio for Mac

docs/csharp/getting-started/with-visual-studio-code.md renamed to docs/core/tutorials/with-visual-studio-code.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: Get started with Visual Studio Code - C# Guide
2+
title: Get started with C# and Visual Studio Code - C# Guide | Microsoft Docs
33
description: Learn how to create and debug your first .NET Core application in C# using Visual Studio Code.
44
keywords: C#, Get Started, Acquisition, Install, Visual Studio Code, Cross Platform
55
author: kendrahavens
66
ms.author: mairaw
7-
ms.date: 5/02/2017
7+
ms.date: 8/01/2017
88
ms.topic: article
99
ms.prod: .net
1010
ms.technology: devlang-csharp
1111
ms.devlang: csharp
1212
ms.assetid: 76c23597-4cf9-467e-8a47-0c3703ce37e7
1313
---
1414

15-
# Get Started with Visual Studio Code
15+
# Get Started with C# and Visual Studio Code
1616

17-
.NET Core gives you a fast and modular platform for creating server applications that run on Windows, Linux, and macOS. Use Visual Studio Code with the C# extension to get a powerful editing experience with full support for C# IntelliSense (smart code completion) and debugging.
17+
.NET Core gives you a fast and modular platform for creating applications that run on Windows, Linux, and macOS. Use Visual Studio Code with the C# extension to get a powerful editing experience with full support for C# IntelliSense (smart code completion) and debugging.
1818

1919
## Prerequisites
2020

@@ -37,17 +37,19 @@ Let's get started with a simple "Hello World" program on .NET Core:
3737
* Alternatively, you can select **File** > **Open Folder** from the main menu to open your project folder.
3838

3939
2. Initialize a C# project:
40-
* Open the Integrated Terminal from Visual Studio Code by typing <kbd>CTRL</kbd>+<kbd>\`</kbd> (backtick).
40+
* Open the Integrated Terminal from Visual Studio Code by typing <kbd>CTRL</kbd>+<kbd>\`</kbd> (backtick). Alternatively, you can select **View** > **Integrated Terminal** from the main menu.
4141
* In the terminal window, type `dotnet new console`.
4242
* This creates a `Program.cs` file in your folder with a simple "Hello World" program already written, along with a C# project file named `HelloWorld.csproj`.
4343

4444
![The dotnet new command](media/with-visual-studio-code/dotnetnew.png)
4545

4646
3. Resolve the build assets:
4747

48-
* Type `dotnet restore`. Running `dotnet restore` gives you access to the required .NET Core packages that are needed to build your project.
48+
* For **.NET Core 1.1**, type `dotnet restore`. Running `dotnet restore` gives you access to the required .NET Core packages that are needed to build your project.
4949

50-
![The dotnet restore command](media/with-visual-studio-code/dotnetrestore.png)
50+
![The dotnet restore command](media/with-visual-studio-code/dotnetrestore.png)
51+
52+
* For **.NET Core 2.0**, this step is optional. The `dotnet restore` command executes automatically when a new project is created.
5153

5254
4. Run the "Hello World" program:
5355

@@ -83,7 +85,7 @@ You can also watch a short video tutorial for further setup help on [Windows](ht
8385

8486
![Run and Debug](media/with-visual-studio-code/rundebug.png)
8587

86-
7. Select the green arrow at the top to continue debugging, or press the red square to stop.
88+
7. Select the green arrow at the top to continue debugging, or select the red square at the top to stop.
8789

8890
> [!TIP]
8991
> For more information and troubleshooting tips on .NET Core debugging with OmniSharp in Visual Studio Code, see [Instructions for setting up the .NET Core debugger](https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger.md).

docs/csharp/getting-started/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following topics are available:
2828

2929
A class library lets you define types and type members that can be called from another application. This topic lets you create a class library with a single method that determines whether a string begins with an uppercase character. Once you've finished building the library, you can develop a [unit test](testing-library-with-visual-studio.md) to ensure that it works as expected, and then you can make it available to [applications that want to consume it](consuming-library-with-visual-studio.md).
3030

31-
- [Get started with Visual Studio Code](with-visual-studio-code.md)
31+
- [Get started with C# and Visual Studio Code](../../core/tutorials/with-visual-studio-code.md)
3232

3333
Visual Studio Code is a free code editor optimized for building and debugging modern web and cloud applications. It supports IntelliSense and is available for Linux, macOS, and Windows.
3434

docs/csharp/getting-started/toc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
## [Building a class library with C# and .NET Core in Visual Studio 2017](library-with-visual-studio.md)
66
### [Testing a class library with .NET Core in Visual Studio 2017](testing-library-with-visual-studio.md)
77
### [Consuming a class library with .NET Core in Visual Studio 2017](consuming-library-with-visual-studio.md)
8-
## [Getting started with Visual Studio Code](with-visual-studio-code.md)
8+
## [Getting started with C# and Visual Studio Code](../../core/tutorials/with-visual-studio-code.md)
99
<!--## [🔧 Getting started with cross-platform tools](with-cross-platform-tools.md)-->
1010
<!--## [🔧 Getting started with C# Interactive](with-csharp-interactive.md)-->

docs/csharp/getting-started/with-visual-studio.md

-85
This file was deleted.

docs/toc.md

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
## [macOS Prerequisites](core/macos-prerequisites.md)
6060
## [Tutorials](core/tutorials/index.md)
6161
### [Building a complete .NET Core solution on Windows, using Visual Studio 2017](core/tutorials/using-on-windows-full-solution.md)
62+
### [Get Started with C# and Visual Studio Code](core/tutorials/with-visual-studio-code.md)
6263
### [Getting started with .NET Core on macOS](core/tutorials/using-on-macos.md)
6364
### [Getting started with .NET Core on macOS using Visual Studio for Mac](core/tutorials/using-on-mac-vs.md)
6465
### [Building a complete .NET Core solution on macOS using Visual Studio for Mac](core/tutorials/using-on-mac-vs-full-solution.md)

0 commit comments

Comments
 (0)