gswardman

A Quick and Dirty Guide To .NET Core: A Dev Tutorial

By gswardman August 19, 2022

Microsoft’s .NET core platform is used to develop both complex and simple solutions running on the cloud, mobile, IoT devices, all computer platforms and pretty much every other architecture out there. As a developer, you are likely going to interact with it in some way even when you are using other technologies to develop.

In this tutorial, we provide a quick and easy-to-digest overview of .NET Core from a developer perspective. It should serve as a resource for both beginners and senior devs who want to get into .NET development but have little time to go through lengthy documentation.

What Is .NET Core?

.NET Core – pronounced as dotnet core- is an open-source, general-purpose, software development platform developed by Microsoft. It was first released in 2016 alongside Visual Studio 2015 as a versatile cross-platform alternative to .NET Framework. Its popularity has shot up in recent years coming third in the 2021 Stackoverflow developer survey -other frameworks and libraries category.

The main characteristics of .NET Core and its successor .NET 5 from a developer perspective include:

It is Cross Platform

Unlike many of Microsoft’s previous development frameworks and tools, .NET core was created as a cross-platform development platform. This means you can run it on Windows, Mac OS, and Linux, and the software you develop can be run on all three platforms. You can also use the platform to develop and test mobile applications, microservices, web applications, etc.

.NET being cross-platform also means that developers can use essential Microsoft development tools on all platforms.  For instance, there are Mac and Linux versions of Visual Studio- Microsoft’s popular IDE. The same goes for the CLI, libraries, mobile dev tools, and server development architecture.

.NET Core was a departure from previous development frameworks that were fragmented and native to Windows. Microsoft, on the release of this new platform, said that they aimed for NET to become a versatile dev platform with a single code base that would allow all developers to build solutions for all OS platforms.

It is Open Source

Microsoft chose to open source .NET core and its subsequent versions because they understood the importance of having a community around it and the growing need for transparency. For these reasons, .NET Core’s codebase is available as an open package on Github published under the Apache 2 and MIT licenses.

NET Core’s runtime source code, its SDK repo, the Rosyln language compiler, and ASP.NET Core repository source codes are available on the Github project page managed by the .NET foundation. The implications from a developer perspective are that anyone can contribute to changes, participate in code reviews, and access all design documents relating to the entire .NET Core framework.

Microsoft says that open sourcing their entire development platform has had many positive implications like making the product attractive to developers and enabling faster implementation. It also makes it easy for both new and experienced developers to understand how .NET Core works and its overall direction as a development platform.

Cross-Architecture Uniformity

A developer working on solutions in any architecture (x64, x 86, or ARM) can execute uniformly across all of them and expect the same behavior from their app. This is a great improvement from previous development environments that required a lot of work to port solutions across architecture and, often, it led to inconsistent behavior and bugs that had to be addressed with updates.

Deployment Flexibility

Unlike previous dev environments by Microsoft, .NET Core allows flexible code deployment on top of the framework or as a self-contained, independent deployment. Deploying on top of the framework means the app is lightweight and relies on natively installed .NET Core deployment components. On the other hand, an independent or standalone deployment allows you to pack every single .NET deployment component within your app bundle.

Backward and Horizontal Compatibility

.NET Core and its successor maintain very good backward compatibility with the old .NET framework as well as horizontal compatibility with other frameworks such as Xamarin and Mono. Implementing components or functionality from these frameworks is smooth and transparent.

Fully-Featured Command Line interface

Fully-Featured Command Line interface

In line with other popular and modern software development platforms like Node, .NET Core came with a very powerful CLI toolset you can use to install packages/dependencies, build, test, execute, and deploy .NET Core applications. The CLI is also cross-platform and open source like the rest of the platform and comes bundled with the .NET Core install.

It is a Modular Development Platform

One of the biggest complaints developers had with the old .NET framework was how heavy it was because it came as a single package mostly full of unwanted components. To improve on that, Microsoft decided to make .NET Core modular. The platform is delivered in an agile fashion using a set of independent and fine-grained NuGet packages.

As a developer, this modularity allows you to update or deploy only the packages and components that are relevant to your project. NET Core consists of the .NET runtime (CoreCLR), the SDK and compiler, the .NET app host, and the fundamental libraries. Nuget assembly packages are spread across the entire development platform and can be removed or integrated at will depending on the nature of the project or desired dev environment.

When Should I Use .NET Core?

When Should I Use .NET Core

You can use .NET Core to build anything and for every platform or computing architecture out there.  The development platform has all the tools, libraries, dependencies, and documentation you need. From mobile applications to web applications (using razor pages), desktop applications to microservices to containers, cloud applications, IoT apps, machine learning solutions, games, etc.

However, as a development platform, .NET core excels or is heavily used in the following areas:

Building Cross-Platform applications

use .NET Core if you need to develop solutions that can run on multiple platforms and you have developers using all three major OS platforms. This is often the case in large organizations or startups building complex enterprise-level solutions across multiple teams.

If you use C#, Visual Studio, Azure, and other Microsoft products

You will find it easier and more convenient to develop inside .NET Core if you primarily develop in a Microsoft environment using their tools and services such as Azure. Most developers who use C# work in .NET Core even though they may use other languages like JSON, CSS, and Typescript to add functionality to their applications.

If you develop With Microservices and Containers

.NET Core is the best dev platform for developing within the Microservices architecture where applications are arranged into independent services. Also, use .NET core if your project needs the use of Docker containers because it excels in the app container deployment approach.

Building Large, Scalable Enterprise applications

.NET Core is by far the most preferred platform for building large enterprise-level solutions that run natively or in the cloud. Microsoft has dedicated most of its resources to providing secure, scalable, and efficient business solutions for businesses.

You Need Horizontal and Backwards Compatibility

Use .NET Core if you need compatibility with solutions developed in .NET, Visual Basic, and other older systems or if working with multiple .NET frameworks concurrently.

What Is .NET Core Cross-Platform?

Cross-platform support means that .NET Core is compatible across computer platforms. You can develop and run .NET core applications in a Windows environment, Mac Os as well as Linux. All major computing architectures are also supported natively. You will not need to install third-party porting tools to implement solutions developed in a different platform other than the one you are currently using.

What are the benefits of .NET Core?

Since it was introduced, .NET Core has made a name for itself as being a versatile, scalable, secure, and easy-to-use software development environment. It has solid corporate backing in addition to the large open source community .NET Core also provides developers with an easy and cost-effective way to build and develop solutions across platforms and architectures.

You will have access to Microsoft’s robust development tools such as Visual Studio and Visual Studio Code as well as third-party dev tools, libraries, and dependencies.NET Core is also liked because it’s fast, modern, user-friendly, and lightweight due to the use of independent Nuget packages.

What Is the Latest Version Of .NET Core?

What Is the Latest Version Of .NET Core

The last version of .NET Core was 3.1 last updated in August 2022. However, Microsoft adopted a more unified and traditional naming system with new versions of the same platform dropping the word “Core”. The current stable version of .NET Core with long-term support (LTS) is NET 6.

How to Install .Net Core

Installing .NET Core for development purposes is easy. All you to do is download and install the SDK using Winget.  You can also install .NET Core alongside Visual Studio Code by downloading the code editor, .NET Core SDK as well and the C# extensiton for VS Code. There are other ways to install the platform depending on your operating system and dev environment.  Hire a .NET developer today and start building complex applications.