Microsoft is pushing hard with .NET Core and everyone can see that they are very proud of it. I never gave too much attention to it but now it’s time. So I started from scratch.
What is .NET Core?
.NET Core is a cross-Platform free and open-source managed software framework – Wikipedia
NET Core is a blazing fast, lightweight and modular platform for creating web applications and services that run on Windows, Linux and Mac. – Microsoft
.NET Core 2.0 implements the .NET Standard 2.0. The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET implementations.
Install
.Net Core 2.0 (https://aka.ms/dotnet-sdk-2.0.0-win-gs-x64)
Create some code
Open console and type:
> dotnet new console -o HelloCore > cd HelloCore
dotnet is the base command of the SDK and it has many features like testing, nuget functionalites, managing dependencies and otheres. The new command is used to initialize new applications and we specify a console application and we want that application in the HelloCore directory. cd HelloCore moves into the newly created app directory.
View the code
With our favourite text editor we open Program.cs and we see that dotnet new has created a simple hello world app.
using System; namespace HelloCore { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }
Run
With the
> dotnet run
command we launch our first .Net Core app.
> Hello World!
TL; DR
.NET Core is a brand new implementation of .NET and it’s the multi-platform component of the .NET family.
With this blog post we explored the basic concepts of .Net Core. We also created our first app in 5 minutes.