다음을 통해 공유


Understanding the .NET Core in Windows

In this article, we will discuss how we can understand the .NET Core, features of .NET Core, Setting up the environment, Creating a Hello World Application and run on it, etc. As you, all the know about .NET Framework much better than me so that we will learn about .NET Core here.

What’s .NET Core?

.NET Core is a open source platform, and it is available on GitHub. It is a cross platform support such as Windows, Mac, Linux, etc. You can be able to develop the apps and run the apps with a different platform like Windows, Mac, Linux, etc. You can be used in cloud based application, device application, and IoT application.

You can see the list of features in .NET Core as below 

  • Flexible deployment
  • Cross platform (Windows, Mac, Linux)
  • Command Line Tools
  • .Net Core is compatible with .Net Framework, Xamarin and Mono
  • Open Source (MIT and Apache 2 license)
  • .Net Core is supported by Microsoft.

You can see the list of supported OS and versions with a multiple platforms as following. 

Supported OS

As mentioned .Net Core is open source cross platform, supported in  variety of operating systems.

Windows Platform:

  • Windows 7 SP1/ 8.1 /10
  • Windows Server 2008 R2 SP1
  • Windows Server 2012 SP1/ R2
  • Windows Server 2016

Linux Platform: 

  • Red Hat Linux 7 / Linux Mint 17
  • Ubuntu 14.04/16.04
  • Fedora 23

Mac Platform: 

  • Mac OS X 10.11

Prerequisites

You have to download the following software and install them on your PC.

You can download and install the free community edition of Visual Studio 2015 from Visual Studio Community portal.  You can download and install the Visual Studio 2015 Update 3 and .NET Core 1.0.0 - VS 2015 Tooling Preview 2 here.

Implementation

This article focus on implementing .Net Core on Window.  There are several interfaces which we can use to develop our app, such as Command line, Visual Studio, Visual Studio Code Editor, etc.

Setting up the Environment in Windows

In this section we will go over step-by-step guidelines on setting up the development environment for (1) developing using Command shell, and (2) development using Visual Studio.

I. Using Command line procedures

If you want to know how to install the DotNetCore.1.0.0-SDK.Preview2-x64, the step-by-step guidelines let’s start

Double Click “DotNetCore.1.0.0-SDK.Preview2-x64” and then click Run button.

The Microsoft.NET Core 1.0.0 - SDK Preview 2 window will open, Select a checkbox “I agree to the license terms and conditions” and then click Install button. 

Installing features is in progress as in the below screen shot 

After successfully installation of the .NET Core 1.0.0 - SDK Preview 2, click Close button. 

 

II. Using Visual Studio 2015 procedures as below

Double Click “DotNetCore.1.0.0-VS2015Tools.Preview2.0.1” and then click Run button. The Microsoft.NET Core 1.0.0 - VS 2015 Tooling Preview 2 window will open, Select a checkbox “I agree to the license terms and conditions” and then click Install button. 

Installing features is in progress as in the below screen shot

After successfully installation of the .NET Core 1.0.0 - VS 2015 Tooling Preview 2, click Close button. 

Creating a Hello World Application and Run on it in Windows

 

We are going to discuss how to develop, build and run the apps with a different way such as Command line, Visual Studio, Visual Studio Code Editor, etc. We will see the step by step guidelines for the .Net Core Hello World app creation here

I. Using Command line procedures as below 

  1. Open cmd.exe (run as Administrator)
  2. Type mkdir HelloWorldApp and Enter in the command line
  3. Type cd HelloWorldApp and Enter in the command line

4. Type dotnet new and Enter in the command line

5. Type dotnet restore and Enter in the command line

6. Type dotnet run and Enter in the command line

II. Using Visual Studio 2015 procedures as below

Open Visual Studio 2015. Go to file menu, point to new and then click new project. New Project window will open, you can select an installed template like “.NET Core” in Visual C# Template, and then select a Console Application (.NET Core) and type Project Name HelloWorldApp. Choose the project location path and then click on the OK button.

 

Now, you can see the HelloWorldApp project structure as in the following screen shot

You can write a Hello Word program and run on it

Reference

Conclusion

We hope you understood the .NET Core, feature of .NET Core, Setting up the environment, Creating a Hello World Application and run on it. We have covered all the required things. If you find anything that we missed in this article, please let me know. Please share your valuable feedback or suggestions.