When Microsoft started to design .Net framework, they’ve done some very fundamental research taking into account pros and cons of other technologies. Microsoft .NET is an exceptionally extensive framework and received great support from developers who refer to its steady programming model, direct support for security, less complexity in development efforts and debugging. Additionally, it makes application deployment and support straightforward and simplifies assembly on devices with the framework installed. One of the fundamental restrictions of the .NET Framework was that it failed to share code across platforms. To overcome this limitation Microsoft has introduced new framework .NET Core.
.NET Core is a new open-source and cross-platform framework for building modern cloud-based web associated applications launched during mid 2016. .NET Core apps can run on .NET Core or on the full .NET Framework. It was designed to give an enhanced development framework for applications that are deployed to the cloud or run on-premises. It consists of modular components with negligible overhead, so you maintain flexibility while constructing your solutions. It will provide web developers with a library which can be deployed over different platforms and which also allows developers to import only the parts of the Framework they require for their projects.
Some Characteristics of .NET Core:
- Flexible deployment: It can be incorporated into your application or installed side-by-side user or machine-wide.
- Cross-platform: It runs on different OS such as Windows, Mac, and Linux.
- Command-line tools: All product scenarios can be practiced at the command-line.
- Compatible: It is compatible with .NET Framework, Xamarin, and Mono, through the .NET Standard Library.
- Open source: It is open source framework, using MIT and Apache 2 licenses.
- Supported by Microsoft: According to the .NET Core Support documentation, it is supported by Microsoft.
It’s really convenient to implement .NET Core on Windows, Mac or Linux . You can have an application up and running in a few minutes. You just need to install .NET Core SDK.
Getting Started with Dot NET Core:
Incase you are using Visual Studio, please ensure you have Visual Studio 2015 installed. You’ll have to install the .NET Core Tools for Visual Studio. You can also develop .NET Core applications from the command-line by downloading the .NET Core SDK for Windows. You can use your own editor, or with Visual Studio Code.Here, we are creating basic console application of .Net core using Visual Studio.
Create .Net core project structure with project.json
Creates project.json file with .Net core dependencies and runtimes section.
Following are the three main component of the project.json file
Dependencies: It is a method for executing loose coupling between objects and their dependencies. It instantiates an object and implement in to a class as constructor parameters or properties to perform its actions.
Runtimes: It is utilized to distinguish operating system where our application runs. In this given image the node instructs the build framework to make executable for windows 10, 64bit version.
Frameworks: It is the rundown of frameworks on which the application can run. You can determine various versions and utilize one of them relying on the platform on which the application runs.
After rolling out this change you can run “dotnet restore” command for restoring packages of .Net core project.
Then you can run “dotnet run” command will execute the application and produce output.
.NET Core provides cross-platform libraries which can be utilized as a part of conjunction with Windows, Mac & Linux for enterprise application development with .NET Framework. This makes .NET Core novel and in addition adaptable. It is created with standard and performance in mind and to make the technology available on numerous platforms as possible. This change makes the developers working on .NET stay side by side with the latest open source tools and it opens up the chances to compose and execute their code on multiple platforms. Furthermore, it is worth to indicate that most recent and upgraded versions of the framework have a lot of impact on such revolution.