- .NET Core
- ASP.NET Core
Using .NET Core in Visual Studio Code
.NET Core gives you a blazing fast and modular platform for creating server applications that run on Windows, Linux and Mac. 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.
If you'd like to get started with a simple "Hello World" program on .NET Core, follow the steps below:
Initialize a C# project:
Open the command prompt (or terminal).
- Navigate to the folder where you'd like to create the C# project.
dotnet new console.
This creates a
Program.csfile in your folder with a simple "Hello World" program already written.
Resolve the build assets by typing
Tip: .NET Core Tools are now MSBuild-based. This means a
.csprojproject file will be created instead of a
project.json. Read more.
restorepulls down the required packages declared in the
- You'll see a new
project.lock.jsonfile in your project folder.
This file contains information about your project's dependencies to make subsequent restores quicker.
When the project folder is first opened in VS Code, a notification will appear at the top of the window asking if you'd like to add the required assets to build and debug your project. Select Yes.
Run the "Hello World" program by typing
dotnet runin the command prompt (or terminal).
Tip: Continue exploring C# development: Debug with VS Code and .NET Core
- Basic Editing - Learn about the powerful VS Code editor.
- Code Navigation - Move quickly through your source code.
- Working with C# - Learn about the great C# support you'll have when working on your .NET Core application.
- Tasks - Running tasks with Gulp, Grunt and Jake. Showing Errors and Warnings
- .NET Core Docs - Visit the .NET Core docs for more information on this powerful cross-platform development solution.