Build Microsoft has made a change to its forthcoming ASP.NET Core 2.0 web framework so that it is now incompatible with the Windows-only .NET Framework, causing confusion and annoyance for some .NET developers.
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:
.NET Core is side-by-side and it's moving fast. It's WAY faster than .NET (Full) Framework can move, which is good. By building ASP.NET Core 2.0 on top of .NET Core 2.0 (which, remember, is a SUPERSET of .NET Standard), that means stuff can be built faster than NetFx or even Netstandard.
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:
Guys, this is kind of garbage :(. We built on top of ASP.NET Core because of the option to use it with netfx, and we built things which were intended to last 5-10 years, not for 1 year of support max. This is what the ASP.NET name means in business and it's why large, slow-moving organisations choose it over flavour-of-the-month frameworks.
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.