Initially developed as Microsoft’s answer to Java, the .NET platform has evolved into a full-fledged ecosystem used by millions of developers worldwide. This article gets you started with an overview of .NET including its main components and how it works internally, as well as the languages you can use with .NET and the kinds of applications you can develop with it. There’s also a brief history of .NET and information about the most current version as of this writing.

What is .NET? (a.k.a. dot net)

.NET (pronounced “dot net” and sometimes written as .Net) is an open source development platform consisting of a software development framework and an accompanying ecosystem of tools, languages, and runtimes. It was created by Microsoft to ease application development across platforms ranging from desktops to mobile devices. Although .NET was originally restricted to Microsoft’s proprietary Windows operating system and platforms, .NET applications can now be written for the web, macOS, iOS, Android, Linux, and more .NET is also a formal standard and officially available as open source.

Microsoft describes .NET as “a consistent object-oriented programming environment, whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.” The .NET platform aims to provide safe execution of code, to deliver better performance than interpreted languages do, and to make the developer experience consistent across a wide variety of apps.

Why do developers use .NET?

Before we dive into how .NET works, it’s important to know why you might want to use it. The short answer is that .NET provides a way for developers familiar with languages like C++, Java, or JavaScript to write enterprise-scale code that is portable across platforms. As is true of many modern application platforms, class libraries built into the platform take care of grunt work like memory management, I/O, and even much of the user interface.

For enterprise developers and organizations already invested in the Microsoft ecosystem, particularly its Visual Studio and Visual Studio Code IDEs, .NET is a logical choice. It also has libraries and application models tailored for Windows, Azure, and ASP. Ultimately, though, .NET is cross-platform and supports many languages and operating systems. For developers accustomed to JavaScript or other scripting language environments, .NET might feel less nimble than what you are used to. Enterprise developers are more likely to appreciate the advantages of a full-fledged platform.

The three main components of .NET

.NET has been around for more than 20 years and it’s evolved considerably since its initial release in 2002. Today, the platform consists of three main components:

  • The .NET base class library packages classes and types that are helpful in performing everyday tasks like dealing with strings and primitives, creating database connections, performing I/O operations, and so on. You’ll sometimes see this called the core .NET library, framework library, or runtime libraries.
  • Application models, sometimes called application stacks, contain higher-level plumbing code for accessing platforms where you might deploy your .NET applications. This includes models for Windows applications, ASP.NET for web applications, macOS and various mobile platforms, and models focused on cloud and AI platforms, game development, and IoT devices.
  • The common infrastructure is the base layer of components that enable the entire ecosystem to actually execute in practice, from compilers to languages to runtime components. These are crucial to understanding what .NET has to offer, so we’ll look at them in more detail in the next sections.

How .NET works

The main components of.NET work together to make the process of writing applications easier. The base class library and application models provide the code to handle most basic programming tasks, so you don’t have to reinvent the wheel with every application you build. And the common infrastructure takes care of much of the scutwork of deploying those applications.

Code written in any of the .NET languages (more about that in the next section) is compiled to an intermediate bytecode language called the Common Intermediate Language, or CIL. CIL code isn’t human-readable but can be ported across operating systems and platforms. The CIL is then compiled again by the Common Language Runtime, or CLR. CLR implementations are platform-specific, and they compile CIL code into machine-readable code that can be executed on the platform you are using. Different CLR versions support both just-in-time and ahead-of-time compilations.

In the process of creating local machine-readable code, the CLR also manages low-level application functionality such as garbage collection and threading. Low-level functionality is crucial to application performance but often tedious for developers to deal with.

If you’ve worked with the Java platform, all of this probably sounds familiar, as .NET follows the same paradigm. The large set of class libraries, intermediary bytecode, and platform-specific runtime management are all features of both offerings. .NET was developed during Java’s initial heyday, and was originally positioned as a competitor to Java’s enterprise platform. Additionally, the Java language and C#—the first and most prominent .NET language—are both derived from C and are semantically similar. We’ll look at the .NET languages next.

What programming languages does .NET use?

C#, F#, and Visual Basic are the most prominent languages used with .NET:

  • C#: Announced with much fanfare upon .NET’s launch in 2002, C# is the most famous and widely used .NET programming language. It was developed internally by Microsoft as part of the .NET initiative, and most of the classes in the .NET base class library are written in C#. The language is object-oriented and is designed to be similar enough to C to be easy for C, C++, Java, and JavaScript developers to quickly learn and use.
  • F#: A functional programming language that’s part of the machine learning language family, F# has roots in LISP.
  • Visual Basic: Microsoft’s venerable, easy-to-learn programming language for developing client-server applications.

Because .NET is composed of open standards, anyone can write a language that compiles to CIL bytecode and can be executed by the CLR. Wikipedia currently lists more than 20 maintained CLI language projects, and almost all of them represent .NET ports of existing languages, from Pascal to JavaScript to COBOL—and yes, even Java.

The fact that this diversity of languages can coexist within .NET is one of the platform’s strengths. Because the code all gets compiled to CIL bytecode, it doesn’t matter which language you use to write your applications. You are free to decide based on your preferences, the strengths and weaknesses of each language, or the different aspects of .NET you can access based on the language you use (these vary). While most of .NET’s base class library was written in C#, you can access those classes from code written in other CLI languages. Components written in different CLI languages can freely interoperate across a .NET application.

.NET history

So far, I’ve used “.NET” as a generic term to refer to the platform, but the .NET ecosystem is actually a bit more complex. Because .NET is an open standard, anyone could potentially implement their own version of it. For much of the platform’s history, Microsoft’s version was called the .NET Framework. Another famous implementation was Mono, released in 2001. Mono was an open source implementation for running .NET applications on Linux, and was controversial at the time due to bad blood between Microsoft and the open source community. Later, Mono formed the basis of the Xamarin platform, which made it possible to build .NET applications for iOS, Android, and macOS as well as Linux. Xamarin began life as the brainchild of Mono’s founders, but the company they founded to support the project was ultimately acquired by Microsoft.

By 2014, Microsoft and the developer community were looking to consolidate their efforts into a .NET implementation rebuilt from the ground up. The result was what was originally called .NET Core, a cross-platform implementation of the .NET standard that shed some of the cruft that had accumulated over the years and was released as open source in 2016. Initially, it lacked the full range of features available in the .NET Framework, and so the .NET Framework, .NET Core, and Xamarin all coexisted, which understandably caused some confusion. In 2017, InfoWorld columnist Simon Bisson grappled with the question of which implementation should be used in which contexts.

Then, in November 2020, Microsoft deprecated the .NET Framework and released a new version of .NET Core, simply dubbed NET 5, as the main implementation of the platform. NET 5 brought together many components from the .NET Framework and Xamarin but left behind some .NET Framework APIs. Xamarin was ultimately subsumed into later versions of .NET, and in 2022 was supplanted by .NET MAUI, which allows developers to create cross-platform UIs in C# and XAML from a single codebase.

What version of .NET do I have?

As of this writing, NET 8 is the most recent version of the platform and .NET 9.0 is available as a release candidate. See the Microsoft page, How to check that .NET is already installed for more about determining what version of .NET you have installed.

Ready to start experimenting with .NET? Download the latest version of .NET from Microsoft’s website, where Docker images are also available. Happy exploring!