.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.
- Install .NET Core.
- Install the C# extension from the VS Code Marketplace.
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
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
- Advanced Ways to Improve Your Site’s SEO - September 29, 2017
- How to Optimize DotNetNuke speed by improving page load, caching and use of CDN - September 28, 2017
- How to solve Joomla is not able to install the extensions - September 27, 2017