Programmers left with not-quite-as-good .NET Core
The bewilderment is understandable. Here is a quick reminder of what various terms mean:
- .NET Framework: The Windows-only .NET runtime and libraries that ship as part of Windows and are maintained with the operating system. The latest version is 4.7, included with Windows 10 Creators Update, and can be installed on Windows Server 2008 R2 and upwards.
- .NET Core: The cross-platform fork of .NET, which runs on Windows, macOS, and Linux (various distros are supported). Current version is 1.0, with 2.0 in preview and set for release in the third quarter of 2017.
- ASP.NET Core: The next generation of the ASP.NET web framework, which (until now) runs either on .NET Framework or .NET Core. The current version is 1.1, with version 2.0 promised at the same time as .NET Core 2.0.
- .NET Standard: A specification that defines APIs available across different versions of .NET. Version 1.6 is supported by .NET Core 1.0 and .NET Framework 4.6.1 and higher, and also by Xamarin on iOS and Android. Version 2.0 is supported by .NET Core 2.0 as well as .NET Framework 4.6.1.
Until recently, the assumption was that ASP.NET Core 2.0 would target .NET Standard, and therefore run on .NET Framework as well as Core, but last week Microsoft development manager Eilon Lipton stated that the updated web framework will target .NET Core 2.0 only, meaning that it will no longer run on .NET Framework.
A busy thread on GitHub ensued, as developers come to terms with this incompatibility.
The difficulty is that although .NET Core generally performs better than .NET Framework, it is not as mature, and many existing .NET libraries do not work. Examples are the full Windows Communication Foundation (WCF) client libraries, System.Drawing, System.DirectoryServices (for Active Directory support), COM automation – which is a Windows-specific technology for calling native code – some cryptographic libraries, and the Oracle database provider.
Workarounds are available in some cases, such as calling into libraries compiled for .NET Framework from .NET Core, but this does not always work. Microsoft is also busy adding libraries to .NET Core that will plug some gaps, but the nature of a cross-platform framework is that not everything can be ported.
Why is Microsoft making this change? It is for speed of development, says developer evangelist Scott Hanselman:
The difficulty is that for many businesses running ASP.NET Core on .NET, Framework was an excellent way to get the benefits of a faster, more modern web framework combined with compatibility with existing libraries and the reassurance of Windows servicing, since the Framework is patched with the operating system.
One developer says:
Developers are also unhappy that despite ASP.NET Core being developed as open source on Github, this major change was made without warning or consultation – though Microsoft’s Damian Edwards says that “we didn’t intend for this change to be so hard, so late, and without warning. Hindsight is 20/20 and if we knew what we know now we would have communicated things earlier.” Edwards adds that ASP.NET Core 1.0 will be supported for an extended period to allow more time to port to the next version.
Microsoft’s developer platform has been subject to many strategic changes over the past few years. The current cross-platform strategy is compelling in many ways, but clear communication and consistent execution is essential for developers to have confidence in its future.
The truth is that migrating the .NET platform from Windows-only to a cross-platform framework is a huge and difficult undertaking, both for Microsoft and for .NET developers. This announcement shows that currently Microsoft is prioritizing optimization of the next-generation platform over compatibility with its Windows-only legacy. Although this makes sense long-term, the risk is that developers will be unable or unwilling to move to the new platform, leaving them stuck with a web framework that will be increasingly out of date.
Microsoft’s primary developer event, Build 2017, is running this week in Seattle, US, and you can be sure that the future of .NET and .NET Core will be a topic of intense discussion. ®
Updated to add
Microsoft has backtracked: ASP.NET Core 2.0 will run on .NET Framework after all.