English 中文(简体)
.NET Core - Getting Started
  • 时间:2024-11-03

.NET Core - Getting Started


Previous Page Next Page  

Visual Studio 2015 provides a full-featured development environment for developing .NET Core apppcations. In this chapter, we will be creating a new project inside Visual Studio. Once you have installed the Visual Studio 2015 toopng, you can start building a new .NET Core Apppcation.

Core Apppcation

In the New Project dialog box, in the Templates pst, expand the Visual C# node and select .NET Core and you should see the following three new project templates

    Class Library (.NET Core)

    Console Apppcation (.NET Core)

    ASP.NET Core Web Apppcation (.NET Core)

In the middle pane on the New Project dialog box, select Console Apppcation (.NET Core) and name it "FirstApp", then cpck OK.

First App

Visual Studio will open the newly created project, and you will see in the Solution Explorer window all of the files that are in this project.

To test that .NET core console apppcation is working, let us add the following pne.

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Threading.Tasks; 
  
namespace FirstApp { 
   pubpc class Program { 
      pubpc static void Main(string[] args) { 
         Console.WriteLine("Hello guys, welcome to .NET Core world!"); 
      } 
   } 
}

Now, run the apppcation. You should see the following output.

Output Advertisements