Why .NET Core is open source

.NET Core is open source

The shift in the way enterprises want to do development explains a lot on the open sourcing of .NET as well as ASP.NET. In part, it is to get the community involved to take advantage of the expertise and ideas of developers who embrace open source projects. Software organizations such as Xamarin and Fog Creek that wrote their own. NET compilers already replaced those with open source Roslyn .NET compiler by Microsoft.

The .NET Core project is under the .NET Foundation’s stewardship. This is believed to be a critical part of promoting and advancing .NET Core stack. There are two huge reasons why .NET Core was made open source. One is to lay the foundation for cross platform .NET and build and leverage a more robust ecosystem.


Microsoft plans on working with developers in the community, which include Mono community to bring .NET to both Mac OS and Linux. The relevance of embracing community contributions was one of the major discussion points in the preparations of Microsoft to go open source with the .NET’s server side.

This is somewhat a surprising move by Microsoft that is a win for all who are involved. It means that the .NET communities and mono developers now could work together in a unified pool wherein more resources and tools become available to them. Simultaneously, it provides all developers with a bigger set of platforms on which to deploy their apps, such as Linux, Mac OS, Android and iOS. A clear win for Linux adopters is the upcoming .NET apps influx that now could be ported and deployed there, together with a big number of .NET developers who could maintain the applications and bring new ones to light.

To support the open source community around .NET, Microsoft spawned the .NET Foundation. They have an organization portal on GitHub wherein the source code of the core libraries of .NET is published under the MIT License. Moreover, Microsoft wants to bring the technologies to Linux, largely in part due to Azure. Running a cloud platform provides Microsoft an interest in Linux which goes far beyond the open source contributions that the Windows Server team has been doing to the Linux kernel so distributions would run on its Hyper-V hypervisor.


In itself, NET is changing as the recent name change for the open source version, from .NET Core 5 to Core 1.0 underlines. Furthermore, .NET Core does not even cover as much as the full .NET 4.6 since it doesn’t have for instance the server-side graphics libraries. The same goes to ASP.NET 4.6 and 5 which has the Web API but not the VB or F# or Web API support. The newer versions do not completely replace the present versions, although they will get the missing pieces later on. Moreover, they are also built in a new method, with more emphasis on moving forward and faster releases than avoiding breaking changes. For the last decade, Microsoft’s building Azure has taught the company a lot with regards to advantages of micro-services for what otherwise would be huge, monolithic apps. The original front-end managed resources such as storage, compute, networking and the core infrastructure components for the entire worldwide serve in a single application. It was a big and complicated codebase that runs on a single data center and took up to a month to release an update after it was finished and tested, meaning that it was only updated once a quarter. Moreover, the management tools for all the various components were secured by one certificate.


Numerous server side stack layers of .NET were made available on open source licenses. In particular, the C# compiler Roslyn was made open source earlier this year under the Apache 2.0 License. Roslyn’s source code could be downloaded from codeplex. Furthermore, guidelines on how to join and contribute were made available.

.NET Core is a modular development stack which is the foundation for all future platforms of .NET. It was made available under the MIT License. The present partial release includes libraries that provide support for Metadata Reader, Immutable Containers, XML management and SIMD vector types. In addition, there is a new Visual Studio 2015 version. It is a free but not an open source version of VS Community 2013 which replaces Visual Studio Express which has for several years the free version of VS IDE. At this point, the code allowing .NET to run on iOS and Linux has not been made yet. It’s expected to be released in the next few months.

The new .NET Core stack will be entirely open source on GitHub. Microsoft has made the necessary changes already.

Why choose .NET Core?

.NET Core

Twelve years since the first .NET framework release, developers ended up with several, fragmented version of .NET for various platforms. From .NET Compact Framework to Windows Phone, Framework to Silverlight and Windows Store apps, each time, Microsoft has taken .NET to a new platform. Supposedly the common language runtime ended up with a varying subset: every time, there is a different runtime, application model and framework with various development done at every layer and APIs which go back to a common code base but have not always remained in common.


Indeed, various platforms always will have different capabilities and features, but as .NET becomes open source and spreads beyond the platforms that Microsoft controls, having a common core instead of a set of subsets that are loosely coupled gets even more important. That is the basic for .NET Core and the open source strategy of .NET.


The .NET framework core is mscorlib that has Windows-centric features such as App Domains and remoting. This means that each time .NET goes to a new platform, it requires a new core. Add the fact that the framework on every new platform is created and maintained by a different team, with its own shipping and version at various times, one gets plenty of divergences. The portable class libraries began to push the platforms closer together but with varying code bases, the same thing are implemented many times.

The combination of the need to build .NET in a more modular and agile way and not wanting to implement the same thing a lot of times when it could be just written once explains why .NET Core stack appears the way it does. .NET Core has a new runtime, CoreCLR that got the just-in-time compiler and the type system, VM, garbage collection as well as other run-time pieces. That is the same level as Mono runtime or .NET Native runtime. Above are the Base Class Libraries from NuGet, such as immutable collections. And, above that is the application model, such as ASP.NET, that bootstraps the CoreCLR and also adds features such as dynamic compilation and NuGet resolution.


The technology of .NET Core makes sense for a cross-platform environment. Thus, this is a strategy by Microsoft that developers should pay attention to. Some of the more pessimistic feedback about the plans tends to underestimate the changes scope or assume a sort of idealized past when .NET has created as a more modular cross-platform stack all along. .NET Core is the Mono componentized version of the full framework that developers work on with Mono. It would in time turn as a de facto cross-platform implementation for stacks.


MODULARITY. NuGet packages became the standard method of adding new functionality to apps. Since Visual Studio 2010, developers used the Package Manager Console and NuGet Package Manager for installing and configuring libraries and frameworks. Now this has been extended to include the core ASP.NET features. The developer could pick and choose which features of ASP.NET to include in the solutions. This opt-in model enables developers to be more deliberate when it comes to which libraries are included in the projects.


All .NET Core 1.0 packages could be found at the GitHub site. Microsoft and the developer community embraced the open source software transparency. All projects are updated actively by both contributors of Microsoft and the community at large. This approach allows a quicker development cycle as well as continuous code enhancement.


In previous versions, WEB API and MVC were based on various versions of the framework. At a minimum, the differences in namespace organization, concepts and classes led to confusion. For instance, the base class controllers were in a different namespace compared to the common result interface for controller actions. This was resolved by .NET Core 1.0 MVC with a single set of objects within one namespace. This is a standardized approach that simplifies the development of both MVC and WEB.API endpoints.


.NET Core 1.0 would run on the current .NET framework but designed to use the new .NET Core 1.0. When .NET Core is targeted, the code of the framework would be packaged with the deployed application. This .NET version has been ported to perform on Linux and OSX. Furthermore, this extends the .NET development usability beyond the Windows platforms. If developers want to work in Linux or OSX, Microsoft developed Visual Studio Code that allows a user to develop on any of the platforms.

The modular design of .NET Core, updated programming language, and productivity enhancements are sure to make the framework popular with software developers.