Barry Luijbregts

The .NET Ecosystem explained

.NET is something that Microsoft created. When I think of .NET, I think of the .NET Framework and Visual Studio. The first production version of the .NET Framework, which was version 1.0, was released on February 13 in 2002. In technology years, this is light-years ago. Since then, new versions of the .NET framework have been released and Microsoft has started efforts to keep .NET a viable development platform in the modern era of the web, mobile and the cloud. This resulted in the recent release of .NET Core 2 and .NET Standard 2.0. Because of this evolution, the .NET Ecosystem has become large and sometimes confusing.
We all know about the .NET Framework, but how does that work with the Base Class Library? And what are Portable Class Libraries and when should you use those? And .NET Core was released. What is that and how is it different from the .NET Framework? And what is the Roslyn Compiler and should you care? And finally, what is .NET Standard and is it part of .NET Core? Is it something that you can install? What should you use to build a reusable library? 

All of this results in confusion and difficulty when you are trying to pick the right project type for your requirements. There are so many options. A .NET Standard class library, a .NET Core one or a .NET Framework one. And what is this Shared Project and this Portable Class Library?

Where should you focus your efforts? Should you learn everything about .NET Core and abandon older knowledge? Which type of runtime should you use? These are very important questions to answer before you start your next project or start learning about a new technology. 
The .NET Ecosystem is being revamped in order to stay able to fulfill the requirements of modern applications. The overview that follows, represents the current state of the Ecosystem. 

The .NET Ecosystem has runtimes. The oldest and most well-known runtime is the .NET Framework. Here is where the confusion begins: even though it is called the .NET Framework, it is mainly a runtime. It does have a framework in it and it is also a platform, so do all the other runtimes, but we’ll get to that. Note that I am using the definitions that Microsoft uses, so that this all still makes sense when you read the documentation. 

As I said previously, the .NET Framework exists since 2002 and is still going strong. You can build WPF, Windows Forms and ASP.NET Forms and MVC applications with it. 

You can build more application types with the .NET Framework, but the types are mainly Windows centric. This is because the .NET Framework uses some Windows specific API’s for some application types.

Then there is the .NET Core runtime. .NET Core was released in 2016 and can be used to create ASP.NET Core and Universal Windows Platform applications with. It runs cross-platform and can be installed side by side, meaning that you can have many versions of .NET Core running on the same computer. It is also small and optimized for performance.

Finally, there is the Mono runtime, which is used by Xamarin applications. The Mono runtime itself is a cross-platform implementation of the .NET Framework and it can run all sorts of applications, like console and Windows Forms applications. Because this article focuses on the .NET Ecosystem, I will limit the discussion around Mono to Xamarin. Xamarin has been around since about 2011 and you can use it to create applications for IOS, for OS X and Android. This is used to build and run native or near-native mobile applications across mobile platforms. The Mono runtime used with Xamarin uses specific API’s for IOS and Android and for building Xamarin.Mac applications with.

The three runtimes all implement .NET Standard. .NET Standard is a specification of .NET APIs that have implementations for each .NET runtime. Because of this, code created for one runtime, can also be executed by another runtime.

Finally, all the runtimes use tools and infrastructure to compile and run code. This includes languages, like C#, VB.NET and F#, which, for the most part, can run on all the runtimes. This also includes build tools, like MSBuild and things like the Common Language Runtime, or CLR and the CoreCLR. 

So all of this stuff together is called; the .NET development platform. The .NET Framework, .NET Core and Mono are Runtimes. These runtimes also contain frameworks for building applications and libraries with. 

The .NET Standard Library is a set of API specifications. It is not a thing that you download and install, it is a specification that describes API’s and what they do. 

And finally, the common infrastructure is the stuff that makes all of this work. It contains compilers, languages and runtime components, like the Garbage Collector and Just In-time compilation.
Created with