Understanding The .NET Core In Windows

In this article, we will discuss, how we can understand .NET Core, features of .NET Core, setting up the environment, creating a Hello World Application and running it, etc.

What’s .NET Core?

.NET Core is a open-source platform and it is available on GitHub. It is a cross platform and is supported by Windows, Mac, Linux etc. You are able to develop the apps and run the apps with a different platform like Windows, Mac, Linux, etc. It can be used in Cloud based Application, device Application and IoT Applications. 

You can see the list of features in .NET Core, as given 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 the versions with the multiple platforms as following.

Windows Platform

  1. Windows 7 SP1/ 8.1 /10.
  2. Windows Server 2008 R2 SP1.
  3. Windows Server 2012 SP1/ R2.
  4. Windows Server 2016.

Linux Platform

  1. Red Hat Linux 7 / Linux Mint 17.
  2. Ubuntu 14.04/16.04.
  3. Fedora 23.

Mac Platform

  1. Mac OS X 10.11.

Let's start with the prerequisites

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

  1. Visual Studio 2015.
  2. Visual Studio 2015 Update 3.
  3. .NET Core 1.0.0 - VS 2015 Tooling Preview 2.
  4. .NET Core 1.0.0 - SDK Preview 2.

You can download and install the free community edition of Visual Studio 2015 from Visual Studio Community portals.

You can download and install Visual Studio 2015 Update 3 and .NET Core 1.0.0 - VS 2015 Tooling Preview 2 here.

Let’s start  implementation

You are able to implement .NET Core with different methods such as Command line, Visual Studio, Visual Studio Code Editor etc.

Setting up the Environment

Using Command line, procedures are given below-

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

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

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 and is shown in the screenshot, given below-

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

 

Using Visual Studio 2015 procedures as below

Double Click “DotNetCore.1.0.0-VS2015Tools.Preview2.0.1” and 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, shown in the screenshot, given below-



After successful installation of .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 .NET Core Hello World app creation, given below-

Use Command line procedures, given 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, given below-



  5. Type dotnet restore and enter in the command line, given below-



  6. Type dotnet run and enter in the command line, given below-

     
Using Visual Studio 2015 procedures, given below-
 
Open Visual Studio 2015. Go to File menu, point to new and click new project. New Project Window will open, you can select an installed template like “.NET Corein Visual C# Template and then select a Console Application (.NET Core) and type Project Name HelloWorldApp. Choose the project location path and click OK button.
 
 

Now, you can see HelloWorldApp project structure, shown in the screenshot, given below-

 

You can write a Hello Word program and run it

 
 
 
Note

You can also read this article in my blog here.

Reference

Conclusion

I hope, you understood .NET Core, features of .NET Core, setting up the environment, creating a Hello World Application and running it. I have covered all the required things. If you find anything that I missed in this article, please let me know. Please share your valuable feedback or suggestions.