by Santhakumar Munuswamy
Posted on 06 September 2016
.NET Core
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:
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:
Let's start being prerequisite
You have to download the following software and install them on your PC.
- Visual Studio 2015
- Visual Studio 2015 Update 3
- .NET Core 1.0.0 - VS 2015 Tooling Preview 2
- .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 the Visual Studio 2015 Update 3 and .NET Core 1.0.0 - VS 2015 Tooling Preview 2 here.
Let’s start being implementation
You can be able to implement .Net Core with a different way such as Command line, Visual Studio, Visual Studio Code Editor, etc.
Setting up the Environment
If you want to know how to install the DotNetCore.1.0.0-SDK.Preview2-x64 and DotNetCore.1.0.0-VS2015Tools.Preview2.0.1, the step-by-step guidelines let’s start
I. Using Command line procedures as below
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
- Open cmd.exe (run as Administrator)
- Type mkdir HelloWorldApp and Enter in the command line
- Type cd HelloWorldApp and Enter in the command line
- Type dotnet new and Enter in the command line
- Type dotnet restore and Enter in the command line
- 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
I hope you understood the .NET Core, feature of .NET Core, Setting up the environment, Creating a Hello World Application and run on 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.