BT

A First Look to .NET Core

| by Sergio De Simone Follow 14 Followers on Dec 08, 2014. Estimated reading time: 3 minutes |

Microsoft announced at connect() that .NET Core would be open sourced and it would provide a single code base to support all platforms, including Windows, Linux and Mac OSX. Recently, Immo Landwerth, Program Manager at Microsoft, has given more details about what .NET Core is and how it will provide "the foundation for all future .NET platforms."

.NET, explains Immo, is actually a family of frameworks, each targeting a specific platform and owned by a different team within Microsoft, what has inevitably caused some divergence in both API and implementations. .NET Core is a new fork of the .NET Framework that aims to provide a common foundation for platform specific extensions, each providing APIs that are specific to given application models, e.g. WinRT interoperability for .NET Native apps or MVC for ASP.NET 5 apps. This common layer is known as the Unified Base Class Library (BCL), which sits on top of a thin layer that included the .NET Runtime.

The Base Class Library is, according to Immo, a step forward from portable class libraries which are already available in .NET in that PCL only define the API surface, while the implementation is still specific to each platform, thus giving rise to the possibility of varying degrees of implementation conformance. The BCL does not provide only a common API across all supported platforms, but actually implements it in a unified way: "The majority of the BCL are pure MSIL assemblies that can be shared as-is." Interestingly, the approach that Microsoft has chosen for those APIs that are peculiar to a given platform is making sure that they still work on all platforms.

"It’s a lot simpler to ask each team owning a specific component to think about how their APIs work across all verticals than trying to retroactively providing a consistent API stack on top. That’s because portability isn’t a something you can provide later.

Another interesting change brought by .NET Core is the use of NuGet as the primary delivery system. .NET Core will be delivered as a set of fine grained packages, each one corresponding to an assembly. In parallel, Microsoft will provide .NET Core distributions, which are essentially just snapshots of all the packages in a specific .NET version as Microsoft tested them, for those cases where the additional freedom of mixing-and-matching NuGet packages is not required.

The use of NuGet and the shift towards a more modular design, says Immo, makes it possible "to turn .NET Core platform into an app-local framework." So, each application will only need to deploy the parts of the framework that it requires. The main benefit of this is that when an app needs upgrading .NET Core, there will be no possibility of breaking compatibility with other existing applications, as it is the case when upgrading the machine-wide, shared .NET Framework.

Finally, Immo clarifies that before the release of Visual Studio 2015, .NET Core will be a pure subset of the .NET Framework. In the future, though, .NET Core will have a shorter release cycle than the .NET Framework and there will be points in time where a feature will only be available on the .NET Core based platforms, until the .NET Framework platform catches up.

It is important to notice that currently .NET Core does not include support for the desktop, where .NET Framework is still to be used, and that "there are no plans to provide a cross-platform UI framework." Replying to a comment to his post, Immo writes that they will "absolutely have the Console APIs available in .NET Core" so it will be possible to write console applications using it, though he does not provide any timeframe for this to happen.

All .NET Core packages can be browsed on NuGet and are identified by their "System." or "Microsoft." prefix, while source code is available on github. To play around with .NET Core, it is possible to download Visual Studio 2015 Preview.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT