Getting Started with dotNET Core: Fundamentals and Setup

Martins charles
8 min readAug 27, 2023

--

By Charles Martins

microsoft dotnet core

I know you are wondering, Is this really the right tech stack for me? What exactly is dotnet Core? How does dotnet Core work? And what is the difference between dotnet Core and the dotnet framework?

I had the same questions when I started this journey, and even if it did take me a while to find the answers, it will be much easier for you because I am about to give you the answers!

This article will give you enough information to clear up that doubt and get started. Things you will learn in this article are:

Difference between dotNET Core and dotNET framework

What dotNET Core is and how it works

How to setup dotNET Core on your Windows

Basic commands in dotNET core

Possibilities of dotNET core as a software developer

.NET Core vs .NET Framework

.NET core vs .NET framework
credit: educba

What does dotnet even mean?

.Net is a top-level domain ( abbreviated as TLD). You have probably also come across other top-level domains like .com, .edu, .gov, .mil, and .org. Domains were created to help internet users ease the process of finding IP addresses and differentiating users on the internet.

What is the difference between dotnet and dotnet framework?

The .Net Framework was created by Microsoft as a development platform for creating Windows apps. This virtual machine is able to compile and execute computer software written in C# and Visual Basic. You can build a desktop or Web application that runs only on Windows using the .NET framework. However, it is not cross-platform, making it difficult to use with different operating systems or different software packages. The .NET framework is also referred to as the .NET standard framework

.NET Core is a cross-platform (platform-independent) subset of the .NET framework. Please note that it is not a programming language! This platform supports two major languages: C# and F#. VB.Net, as well, but we are slowly moving away from it.

.NET Core was introduced in 2014 by Microsoft as an open-source successor to the .NET framework. .NET Core is used to develop modern web applications that run on Windows, Linux, and macOS. .NET Core was developed with the need to implement cloud technology in software development. Microsoft has since rebranded .NET Core to .NET since the beginning of .NET 5.0.

Both the .NET Framework and .NET Core are still supported by Microsoft. However, many .NET developers use .NET Core to develop applications as it is fast, lightweight, speeds up execution, and is easy to maintain. Although the .NET framework has its own benefits and purposes, we will only be focusing on .NET Core in this article.

.NET Core

Why dotnetcore?

.NET Core quickly gained popularity for the following reasons:

It is open-source. .NET Core has an active community of developers who continue to contribute to its development. This has made .NET Core grow rapidly with new features and improvements. We have seen newer versions emerge over the years. The most recent version of .NET Core is .NET 7.0. Although, you may want to install NET 6.0 (LTS), which is the version I set up in this article.

versions of .NET Core
LTS and STS signify the length of support. LTS releases patches and gets free support for three years and STS releases patches and gets free support for 18 months.

It is easy to use. .NET Core is cross-platform and easy to use. Its tools and libraries simplify software development on any operating system. With an active community and documentation, even developers who are new to the framework have little to no problem finding answers and troubleshooting issues.

It uses JIT (Just-In-Time) compilation for better performance. .NET Core is valued for its performance and how it handles high-traffic workloads. JIT is a component of the.NET CLR (Common Language Runtime). JIT allows faster execution of code across multiple platforms. This leads to faster startup times for .NET applications and better overall performance.

It is designed to implement cloud services. If you are building applications that will incorporate cloud services such as AWS and Azure, then .NET Core is perfect. You can deploy .NET Core applications to the cloud and make them scalable, secure, and reliable.

It can be used for developing a wide range of applications. Whether it is a Mobile app, Microservice, Game, IoT app, Desktop app, TV app, Watch app or machine learning, .NET Core can be utilized in building such applications.

How does dotnet Core work?

.NET Core comprises a set of libraries, a runtime, and development tools that allow it to support programming languages like C#, Visual Basic, and F#. There are four major components that make up the .NET Core framework:

  1. Core CLR
  2. CLI tools
  3. Core fx
  4. Roslyn

Core CLR: This is the runtime of .NET Core. Common Language Runtime (CLR) is the execution engine used in .NET Core. The CLR eases the design of components and applications whose objects interact across languages by handling object layouts and managing references to objects. Language compilers generate metadata that describes code types, members, and references. The CLR uses this metadata to locate and load classes, lay out instances in memory, resolve method invocations, generate native code, enforce security, and set runtime context boundaries.

It also provides other features like Just-in-time compilation and garbage collection (an automatic memory manager).

CLI tools: CLI is short for command line interface. This is a user interface that is used to interact with the computer. You input commands via text, these are prompts that usually follow a particular syntax, and are run by the computer. The command shell in the Windows operating system is an example of a command line interface.

.NET CLI is used to create and restore packages, build and publish .NET applications. It follows the command structure (syntax)

dotnet <command> <argument> <option>

For example: dotnet build

using the command line to build .NET applications

Core fx: These are a set of libraries that provide functionality to .NET Core applications. Developers choose the libraries needed for the .NET application. The functionalities provided include data transfer, networking, and collection.

Rosyln: The .NET compiler that translates codes into intermediate language code (IL). IL is a low-level language that can be executed by the .NET runtime. This compiler is open source and supports C# and Visual Basic. It also includes an API for code generation, analysis, and compilation.

Note: F# has a different compiler, fsc.exe, for compiling F# code.

Where is dotnet Core used?

Industries where you can use dotnet core

Learning .NET Core isn’t just another hobby that goes unrewarded. If you are wondering what job opportunities await you as a .NET developer, here are some industries where you can work:

  1. Healthcare: Modern healthcare facilities require robust systems to manage patients’ data. You can work in healthcare, building applications for patients and healthcare professionals.
  2. Enterprises and Businesses: E-commerce is such a big deal these days and many of them need web or mobile applications to help keep their businesses running
  3. Big Tech: Corporations like Microsoft, Cisco, Intel, JP Morgan, etc. use .NET Core to run their applications
  4. Fintech: Banks and other financial applications have a need for efficient and high-performance software. And you know what platform provides that, right?

When you think of it properly, almost every entity or individual that carries out online activities has a need for a .NET developer.

Setting up .NET Core

setting up your local dotnet environment

Have you decided to become a dotnet developer with dotnet Core? Well, let’s just get you started.

First, you need to check if dotnet Core is installed by accessing your command line interface. You can access the command line by typing CMD in your Windows search bar. Once your command prompt pops up, type dotnet into your command line and enter.

If you see the message below displayed on your screen, it means you have dotnet installed.

how to check if dotnet is installed on your local system
This is what the console looks like using Replit, it is different if you are using the command line

Installing .NET Core

If you do not have dotnet Core installed, you will get a message saying dotnet is not a recognized command. All you have to do at this point is download dotnet SDK.

How to download dotnet SDK files

Once installed, follow the prompt. To not make this article any longer, here is a YouTube video on how to install the .NET 6 SDK.

This is how to check dotnet Core version in CMD

Once installed, you can check what version of dotnet is installed on your local device by using the dotnet command dotnet - -version. The image below will be displayed on your screen. You can see the version of dotnet my Replit runs on is .NET 6.0

how to check what dotnet version you have installed

Now, you have taken the first big step in setting up your work environment, you have successfully used two dotnet commands. There are other dotnet commands besides dotnet and dotnet --version. You can use another dotnet command to see a list of dotnet commands by typing dotnet - -help into the command line. You will get a message like this:

How to check dotnet help commands

This shows the list of SDK commands and what each dotnet command does.

Now that we have established the fundamentals and setup .NET Core. We can get straight to coding in one of .NET Core’s most prominent languages, C#. If you found this article to be really helpful. You can follow me on my medium page.

Next up, C# fundamentals!

REFERENCES

What is a .NET Developer? Explore the .NET Developer Career Path. https://www.nobledesktop.com/careers/net-developer#related-careers.

Why Use The .NET Platform? Top Benefits For 5 Industries. https://www.bairesdev.com/net/benefits/

Chand, M. What Is .NET Core? https://www.c-sharpcorner.com/article/what-is-dot-net-core/#:~:text=modular%2C%20and%20flexible.-.

What makes .NET Core? — Learn C# in 7 days [Book].https://www.oreilly.com/library/view/learn-c-in/9781787287044/46e740c3-3be5-42c8-b813-d51fa9e3782e.xhtml#:~:text=NET%20Core%3F-

Microsoft .NET and .NET Core — Microsoft Lifecycle.https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-and-net-core.

--

--

Martins charles

Hi I'm Charles. A life long learner, welcome to my thought box, if you stay long enough I have exciting things to share!