.NET Core development

Getting started with .NET Core

In this tutorial, we will learn the following things.

  1. What is .NET Core
  2. Installing Visual Studio Code and .NET Core
  3. How to create a .NET Core console app
  4. Compile and running console app

First of all, we should learn what is .NET Core.

.NET Core is an open source, lightweight and cross-platform(MacOS, Linux, Windows) provided by Microsoft for building modern web apps and services, IoT services and mobile back-end.

Before creating the .NET Core project you need to

  1. Install .NET Core (click here to install .NET Core)
  2. Visual Studio Code (Visual Studio Code) or you can use your favorite editor
  3. For C# IntelliSense in Visual Studio Code install the C# Extension in Visual Studio Code (C# Extension)

Step # 1:

Create new directory or open an empty directory in command prompt window

 

 

Step #2:

Navigate to the new directory

 

 

Step #3:

Create new console project, but we can create ASP.NET Core project here (We will cover up later)

 

 

 

Step #4:

Restore all the necessary dependency and tools for our console app from NuGet (which is package manager)

 

Step #5:

After restoring finish, we can run our project to see the output or we can build the project first by using dotnet build command.

 

 

Now change the output

Open your project in Visual Studio Code or any other editor by right click on project folder and open

Now open the Program.cs file and change the text

 

 

 

 

After change “Hello World” to “My first app” run the command dotnet run to see the changed output

 

 

Now you can create cross-platform console app, and in the next tutorial, we will learn that how to create ASP.NET Core cross-platform web app.