You might have heard the news that .NET is open source. In this post I’m going to explain what exactly we open sourced, why we did it, and how you can get involved.
If you’re not familiar with .NET, it’s a managed execution environment that provides a variety of services to its running applications including things like automatic memory management, type safety, native interop, and multiple modern programming languages that make it easier to build all kinds of apps, for nearly any device, quickly. The first version of .NET was initially released in 2002 and quickly picked up steam in many businesses. Today there are over 1.8 billion active installs of the .NET Framework and 6 million .NET developers in the world.
The .NET Framework consists of these major components: the common language runtime (CLR), which is the execution engine that handles running applications; the .NET Framework Base Class Libraries (BCL), which provides a library of tested, reusable code that developers can call from their own applications; and the managed languages and compilers for C#, F#, and Visual Basic. Application models extend the common libraries of the .NET Framework to provide additional libraries that developers can use to build specific types of applications, like web, desktop, mobile device apps, etc. For more information on all the components in .NET 2015 see: Understanding .NET 2015.
There are multiple implementations of .NET, some from Microsoft and others from other companies or open source projects. In this post, I’ll focus on .NET Core from Microsoft.
NET Core is a general purpose, modular framework that can be used across a variety of app models, platforms and architectures. It is a subset of the larger .NET Framework that is part of Windows and is a refactored set of base class libraries (BCL) and runtime (CLR). There were three key reasons for us to invest in .NET Core:
- .NET innovation – enable .NET features and capabilities to be used for more apps on more platforms by updating every layer including the languages, compilers, base class libraries, app models, runtimes, and tools.
- Open Source – bring engineering processes out in the open and develop with the help and support of the community, drawing on the vibrant .NET ecosystem now, and fostering it into the future.
- Cross platform – enable .NET Core to be ported to many platforms and architectures including Linux and Mac because businesses are operating in increasingly heterogeneous environments.
.NET Core is at its heart an ECMA 335 implementation, however, it has very different deployment characteristics than other .NET implementations built by Microsoft. In short, it doesn’t have any deployment requirements. It can be installed with an app, as an independent component, or multiple versions of .NET Core can be installed on a machine for multiple apps to use. You choose the packages you need to deploy alongside your app which are available through the .NET package manager, NuGet.
We will support .NET Core on Linux, OS X and Windows. And it’s all open source. Because of that, the community has been able to create an initial port of .NET Core running on FreeBSD and more ports are in discussion by the community. It is important to lay the foundation for a cross-platform .NET and build a stronger ecosystem through open source. Mono is an existing open source .NET implementation and supports many platforms. We are working closely with the Mono project to bring the Mono and Microsoft .NET implementations and ecosystems closer together now that .NET Core is open source.
Businesses today are operating in mixed platform environments and are relying on open source software more and more. For instance, there are workloads, particularly server workloads like ElasticSearch, Hadoop, etc., which only run in Linux server environments. It’s important that we bring .NET to other platforms to enable new classes of apps and new hosting options for IT.
At the time of writing, the following components of.NET Core are open source:
- .NET Core Common Language Runtime – CoreCLR repo
- .NET Core Framework Libraries – CoreFx repo
- .NET Compiler Platform (“Roslyn”) and C# and Visual Basic languages – Roslyn repo
The following components are closely related and also open source projects:
- F# Compiler and language – Fsharp repo
- .NET Core LLVM compiler – LLILC repo
- ASP.NET 5 – ASP.NET Home repo
- Mono – Mono repo
Going open source
When we announced .NET Core is open source back in November 2014, it started with a small set of Core Framework libraries at first, and now includes more than 50% of the planned set. The entire .NET Core runtime was released at once in February 2015, including a partial Linux implementation. It was very important to start the project in the open, with the community, instead of working behind closed doors. It also was very important for us to get to the point where all the engineers were working in the open and on the same level playing field as anyone else. Internal engineering processes needed to be changed in order to enable open feedback and collaboration with the community.
OSS isn’t new to Microsoft, but it is new to the .NET runtime & libraries. It’s a big effort to take a 15+ year old project that so many people have worked on behind closed doors for that long and move not only the code, but also all the engineering processes out in the open. We realize that in order to build a successful open, cross-platform .NET, community contributions are essential. Which means it’s essential for us to be open and transparent with our community. A lot of learning has happened and continues to happen, and the community has been very receptive. We’re now at the point where we are almost getting more pull requests and issues than we can keep up with on GitHub.
Community and collaboration
In addition to .NET Core, there are many tools, application models, libraries, and more that are all open source under permissive licenses through the stewardship of the .NET Foundation www.dotnetfoundation.org. The .NET Foundation is an independent organization to foster open development and collaboration around .NET. Microsoft has contributed several projects to the .NET Foundation, such as .NET Core, ASP.NET 5, Roslyn, Orleans, and MSBuild, as just a few examples. Xamarin contributed MailKit, MimeKit, Xamarin.Mobile and Xamarin.Auth. Other projects have come from Umbraco, Salesforce, and the .NET community. We encourage people to help build these projects together, but you can also fork them and build .NET projects or commercial products of your own. Explore all the .NET Foundation repos and contribute at dotnet.github.io. There are currently over 140 repositories in the .NET Foundation with over 2800 contributors, and we’re growing daily.
And you don’t have to contribute code. You can contribute by testing code, filing issues, or engaging in design discussions. For example, the ASP.NET 5 team conducts design reviews and project status updates in live sessions that you can participate in. So does the .NET team. The Roslyn team conducts language design reviews in the open as well. There are a ton of ways to get involved. You can also ask questions and find out more about the .NET Foundation in the .NET Foundation forums.
The .NET Foundation provides services to projects so developers can concentrate on building amazing things together, and not all the infrastructure and legal documents needed to support an open source project. For instance, the .NET foundation provides automated, electronic, Contribution License Agreements (CLAs) when contributors submit their first pull request to any of the projects. We also provide mentoring and project incubation in order to set up projects for success.
The .NET Foundation team is composed of Microsoft employees and community members that care about the future of .NET. On the board of directors is Miguel de Icaza, co-founder and CTO of Xamarin, who has directed the Mono project since its creation in 2001. We also have an advisory council that drives key initiatives in the foundation and guides the board. You can see all the key people behind the foundation on our website.
You will be able to create .NET Core apps that run on multiple OSes and CPUs. .NET Core runs on Windows today. Ports are in progress and running on Linux, OS X, and FreeBSD, as is integration with the LLVM compiler. By open sourcing .NET, we hope to generate interest in future generations of developers by building a stronger ecosystem of software built on .NET.
You can get started learning about .NET Core at dotnet.github.io/core. Introduction to ASP.NET 5 is also a good place to start if you’re currently a web developer and want to approach learning .NET Core from an application model perspective. ASP.NET 5 is a lean framework for building modern web apps in .NET.
The future of .NET relies on innovative thinking, working with the whole community, open source, and providing a cross-platform .NET. Whether you are a current .NET developer or not, I encourage you to take a look at where .NET Core is headed and provide feedback to the team and get involved.
Editor’s note: if you’re interested in getting started with C# and .NET Core, check out Programming C# 6.0 by Ian Griffiths.
Public domain mesh image via Pixabay.