Monday, August 14th was an amazing day to be a
.NET developer! As the world celebrates another triumphant series of announcements from Microsoft, there is still confusion amongst the masses.
What is this
.NET Standardthing? What does it mean to target
.NET Core, or even the
.NET Framework? As a developer, what
.NETshould I target and why? Are Portable Class Libraries (PCLs) dead? Developer Community
All of these questions have already been answered, you just have to know where to look. In this post I will provide some invaluable resources and educate those of you who are still confused.
Here are all the recent announcements, feel free to spend some time checking them out – be sure to come back.
- The ASP.NET team is proud to announce general availability of ASP.NET Core 2.0.
- .NET Core 2.0 is available today August 14, as a final release
- The .NET Standard 2.0 specification is now complete
- Visual Studio 17 version 15.3
Let’s start by answering all these common questions.
If the name Immo Landwerth doesn’t ring a bell, perhaps @terrajobst will? Regardless of whether you’ve heard of him before – you’d be wise to remember him now. He is a program manager for Microsoft and has a huge part in the
.NET ecosystem as a whole. Immo has a
.NET Standard video series on and if you do not have time to read this post, by all means watch his videos.
.NET Standardis a specification. It represents a set of APIs that all
.NETplatforms have to implement. Immo Landwerth
.NET Standard is mistaken for a runtime. Consider the name
.NET Standard at face value, it has the word “standard” in it…because it is not a framework or a core runtime.
.NET Standardisn’t a runtime, it’s a version interface - a list of methods you can use under many different “
.NETs”. Scott Hanselman
As true with all standards (or specifications), implementations can either be compliant or non-compliant. At this point in time there are four
.NET implementations that are
.NET Standard 2 compliant. They are as follows,
Xamarin. Below is a more comprehensive listing of all the
.NET platforms and their corresponding standard that they implement.
Additionally, here is an interactive table.
For example, we can see the
.NET Framework 4.5 is an implementation of
.NET Standard 1.1. This means that if you’re to author a
.NET Standard class library and you target
1.1 of the standard, it can run on
.NET Core 1.0,
.NET Framework 4.5,
Mono 4.6, etc… you get the point now I’m sure.
There is a bit of a trade-off though that you should consider. With every version of the
.NET Standard there is an inverse relationship to the number of implementations. The higher the version of the
.NET Standard, the more APIs you have access to. However, there are fewer implementations that exist for higher versions of the
It is typically advised that you target the lowest version of the standard that you can get away with. This allows your code to run in more places, as there are more implementations of lower versioned standards. Portable Class Libraries (or PCLs) have been replaced by the
.NET Standard. If you’re like me, you probably want the latest and greatest – the fullest set of APIs…and that is ok. As long as you control the environment in which it’s consumed, great!
.NET API Explorer
Microsoft has been hard at work, and their documentation teams have been putting together some incredibly useful ways to consume documentation. As a developer, I typically rely on StackOverflow as a source of truth – however, I have been finding myself spending more time on the official documentation sites. A big to the team for making the
.NET docs so much better than before. They even have a
.NET API Explorer. This is immensely powerful – in a matter of seconds I can quickly explore APIs and determine if something is lacking.
.NET Coreis a general purpose development platform maintained by Microsoft and the
.NETcommunity on GitHub. It is cross-platform, supporting Windows, macOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios.
The obvious advantages are that
.NET Core is cross-platform and open source. Unlike
.NET Framework that is neither of those two things.
If you have been a
.NET developer for more than a few years, then you should already be familiar with the
.NET Framework. This is what you have been developing on and targeting forever. However, with the introduction of
.NET Standard and
.NET Core, that is likely to change. You no longer have to limit your OS or platform to Windows.
With all the
.NET terms flying around the web, it felt appropriate to throw another one at you.
.NET Foundationis an independent organization to foster open development and collaboration around the
.NETecosystem. It serves as a forum for community and commercial developers alike to broaden and strengthen the future of the
.NETecosystem by promoting openness and community participation to encourage innovation. www.dotnetfoundation.org
Be sure to visit their site and get involved!
.NET ecosystem is rapidly evolving! With open source and cross-platform being two key priorities, you’re in good hands. When developing for
.NET be familiar with what version of the
.NET Standard suits your needs – and target accordingly.